diff options
Diffstat (limited to 'content_scripts')
| -rw-r--r-- | content_scripts/mode.coffee | 2 | ||||
| -rw-r--r-- | content_scripts/mode_insert.coffee | 2 | ||||
| -rw-r--r-- | content_scripts/mode_passkeys.coffee | 4 | ||||
| -rw-r--r-- | content_scripts/vimium_frontend.coffee | 7 |
4 files changed, 5 insertions, 10 deletions
diff --git a/content_scripts/mode.coffee b/content_scripts/mode.coffee index 88938e79..82dbf74a 100644 --- a/content_scripts/mode.coffee +++ b/content_scripts/mode.coffee @@ -40,7 +40,7 @@ class Mode if type == "keydown" and KeyboardUtils.isEscape event @exit() return Mode.suppressPropagation - handlerStack.passThrough + handlerStack.passDirectlyToPage # Generate a default handler which always suppresses propagation; except Esc, which pops the current mode. generateSuppressPropagation: (type) -> diff --git a/content_scripts/mode_insert.coffee b/content_scripts/mode_insert.coffee index 4a1d4349..4ef490c9 100644 --- a/content_scripts/mode_insert.coffee +++ b/content_scripts/mode_insert.coffee @@ -27,7 +27,7 @@ class InsertMode extends Mode generateKeyHandler: (type) -> (event) => return Mode.propagate unless @isActive() - return handlerStack.passThrough unless type == "keydown" and KeyboardUtils.isEscape event + return handlerStack.passDirectlyToPage unless type == "keydown" and KeyboardUtils.isEscape event # We're now exiting insert mode. if @canEditElement event.srcElement # Remove the focus so the user can't just get himself back into insert mode by typing in the same input diff --git a/content_scripts/mode_passkeys.coffee b/content_scripts/mode_passkeys.coffee index 7a0249ad..ce9f25d2 100644 --- a/content_scripts/mode_passkeys.coffee +++ b/content_scripts/mode_passkeys.coffee @@ -11,8 +11,8 @@ class PassKeysMode extends Mode handlePassKeyEvent: (event) -> for keyChar in [KeyboardUtils.getKeyChar(event), String.fromCharCode(event.charCode)] - # A key is passed through to the underlying page by returning handlerStack.passThrough. - return handlerStack.passThrough if keyChar and @isPassKey keyChar + # A key is passed through to the underlying page by returning handlerStack.passDirectlyToPage. + return handlerStack.passDirectlyToPage if keyChar and @isPassKey keyChar true setState: (response) -> diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 409cf96b..59404247 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -123,11 +123,6 @@ initializePreDomReady = -> # immediately above normal mode. Scroller.init settings - handlePassKeyEvent = (event) -> - for keyChar in [ KeyboardUtils.getKeyChar(event), String.fromCharCode(event.charCode) ] - return handlerStack.passThrough if keyChar and isPassKey keyChar - true - # Install passKeys and insert modes. These too are permanently on the stack (although not always active). passKeysMode = new PassKeysMode() insertMode = new InsertMode() @@ -444,7 +439,7 @@ onKeypress = (event) -> DomUtils.suppressEvent(event) else if (!isInsertMode() && !findMode) if (isPassKey keyChar) - return handlerStack.passThrough + return handlerStack.passDirectlyToPage if (currentCompletionKeys.indexOf(keyChar) != -1 or isValidFirstKey(keyChar)) DomUtils.suppressEvent(event) |
