diff options
| author | Stephen Blott | 2015-03-06 13:37:16 +0000 | 
|---|---|---|
| committer | Stephen Blott | 2015-03-06 13:37:16 +0000 | 
| commit | 3f59222312e1aab165eaa5eaa379de256d8e61d0 (patch) | |
| tree | a041c2fd2faf3e04fe1de7a01b6b77e6bf28a9a2 | |
| parent | 52c06b16325968289890dab2133f2ec33540fcb4 (diff) | |
| download | vimium-3f59222312e1aab165eaa5eaa379de256d8e61d0.tar.bz2 | |
Correctly remove event listeners.
Fix oversight from #1517.
| -rw-r--r-- | content_scripts/ui_component.coffee | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/content_scripts/ui_component.coffee b/content_scripts/ui_component.coffee index c6b59464..dadc84b5 100644 --- a/content_scripts/ui_component.coffee +++ b/content_scripts/ui_component.coffee @@ -38,7 +38,7 @@ class UIComponent      @iframeElement.classList.add "vimiumUIComponentShowing"      window.addEventListener "focus", @onFocus = (event) =>        if event.target == window -        window.removeEventListener @onFocus +        window.removeEventListener "focus", @onFocus          @onFocus = null          @postMessage "hide"      @showing = true @@ -46,7 +46,7 @@ class UIComponent    hide: (focusWindow = true)->      @iframeElement.classList.remove "vimiumUIComponentShowing"      @iframeElement.classList.add "vimiumUIComponentHidden" -    window.removeEventListener @onFocus if @onFocus +    window.removeEventListener "focus", @onFocus if @onFocus      @onFocus = null      window.focus() if focusWindow      @showing = false | 
