diff options
| author | Stephen Blott | 2015-04-28 06:48:31 +0100 |
|---|---|---|
| committer | Stephen Blott | 2015-04-28 06:48:31 +0100 |
| commit | 693dfecba05e6aaa1c32332fc3a0377d387f2a34 (patch) | |
| tree | d17698373d9d4fd50538b1046a3c0f620f3047e4 | |
| parent | d6b195ea85b06dcab8d66d047f8c494c3304e88e (diff) | |
| parent | cfb137d515e6f214322538fdd9a8e236445b63b0 (diff) | |
| download | vimium-693dfecba05e6aaa1c32332fc3a0377d387f2a34.tar.bz2 | |
Merge pull request #1608 from smblott-github/grab-back-focus-only-if-enabled
Do not grab back focus if Vimium is disabled.
| -rw-r--r-- | content_scripts/vimium_frontend.coffee | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index e7aea163..b322af53 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -149,7 +149,6 @@ window.initializeModes = -> new NormalMode new PassKeysMode new InsertMode permanent: true - new GrabBackFocus Scroller.init settings # @@ -159,6 +158,8 @@ initializePreDomReady = -> settings.addEventListener("load", LinkHints.init.bind(LinkHints)) settings.load() + # Note. checkIfEnabledForUrl() must come after initializeModes(), here, because checkIfEnabledForUrl() may + # install an additional mode (GrabBackFocus). initializeModes() checkIfEnabledForUrl() refreshCompletionKeys() @@ -229,7 +230,9 @@ window.installListeners = -> do (type) -> installListener window, type, (event) -> handlerStack.bubbleEvent type, event installListener document, "DOMActivate", (event) -> handlerStack.bubbleEvent 'DOMActivate', event installedListeners = true + # Other one-time initialization operations. FindModeHistory.init() + new GrabBackFocus if isEnabledForUrl # # Whenever we get the focus: |
