diff options
| author | mrmr1993 | 2017-08-15 16:46:44 +0100 | 
|---|---|---|
| committer | mrmr1993 | 2017-11-18 12:35:29 +0000 | 
| commit | 976221f84b9694a5aa544eff8f084b78ce8c78d9 (patch) | |
| tree | 7e1c1a2e6e502c3b9210c72209e52497e6916c07 | |
| parent | 5f36adb083b86324923a9a316541a84448475dc0 (diff) | |
| download | vimium-976221f84b9694a5aa544eff8f084b78ce8c78d9.tar.bz2 | |
Initialize the HUD for clipboard operations if it hasn't been already
| -rw-r--r-- | content_scripts/hud.coffee | 8 | 
1 files changed, 6 insertions, 2 deletions
| diff --git a/content_scripts/hud.coffee b/content_scripts/hud.coffee index 928ae5fd..d4c38447 100644 --- a/content_scripts/hud.coffee +++ b/content_scripts/hud.coffee @@ -90,10 +90,14 @@ HUD =    # * we don't want to disrupt the focus in the page, in case the page is listening for focus/blur events.    # * the HUD shouldn't be active for this frame while any of the copy/paste commands are running.    copyToClipboard: (text) -> -    @hudUI.postMessage {name: "copyToClipboard", data: text} +    DomUtils.documentComplete => +      @init() +      @hudUI?.postMessage {name: "copyToClipboard", data: text}    pasteFromClipboard: (@pasteListener) -> -    @hudUI.postMessage {name: "pasteFromClipboard"} +    DomUtils.documentComplete => +      @init() +      @hudUI?.postMessage {name: "pasteFromClipboard"}    pasteResponse: ({data}) ->      @pasteListener data | 
