diff options
| -rw-r--r-- | content_scripts/vimium_frontend.coffee | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 77738f59..07b430ba 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -460,7 +460,10 @@ onKeypress = (event) -> else if (!isInsertMode() && !findMode) if (isPassKey keyChar) return handlerStack.stopBubblingAndTrue - if (currentCompletionKeys.indexOf(keyChar) != -1 or isValidFirstKey(keyChar)) + if currentCompletionKeys.indexOf(keyChar) != -1 or isValidFirstKey(keyChar) or + # If PostFindMode is active, then we're blocking vimium's keystrokes from going into an input + # element. So we should also block other keystrokes (otherwise, it's weird). + InsertModeBlocker.isActive() DomUtils.suppressEvent(event) keyPort.postMessage({ keyChar:keyChar, frameId:frameId }) @@ -555,7 +558,10 @@ onKeydown = (event) -> # TOOD(ilya): Revisit this. Not sure it's the absolute best approach. if (keyChar == "" && !isInsertMode() && (currentCompletionKeys.indexOf(KeyboardUtils.getKeyChar(event)) != -1 || - isValidFirstKey(KeyboardUtils.getKeyChar(event)))) + isValidFirstKey(KeyboardUtils.getKeyChar(event)) || + # If PostFindMode is active, then we're blocking vimium's keystrokes from going into an input + # element. So we should also block other keystrokes (otherwise, it's weird). + InsertModeBlocker.isActive())) DomUtils.suppressPropagation(event) KeydownEvents.push event |
