diff options
| author | Stephen Blott | 2015-04-28 05:46:11 +0100 |
|---|---|---|
| committer | Stephen Blott | 2015-04-28 05:46:11 +0100 |
| commit | cfb137d515e6f214322538fdd9a8e236445b63b0 (patch) | |
| tree | d17698373d9d4fd50538b1046a3c0f620f3047e4 /content_scripts | |
| parent | d6b195ea85b06dcab8d66d047f8c494c3304e88e (diff) | |
| download | vimium-cfb137d515e6f214322538fdd9a8e236445b63b0.tar.bz2 | |
Do not grab back focus if Vimium is disabled.
Diffstat (limited to 'content_scripts')
| -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: |
