aboutsummaryrefslogtreecommitdiffstats
path: root/vimiumFrontend.js
diff options
context:
space:
mode:
Diffstat (limited to 'vimiumFrontend.js')
-rw-r--r--vimiumFrontend.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/vimiumFrontend.js b/vimiumFrontend.js
index 9f64f1c6..06650feb 100644
--- a/vimiumFrontend.js
+++ b/vimiumFrontend.js
@@ -132,7 +132,7 @@ function initializePreDomReady() {
* This is called once the background page has told us that Vimium should be enabled for the current URL.
*/
function initializeWhenEnabled() {
- document.addEventListener("keydown", onKeydown);
+ document.addEventListener("keydown", onKeydown, true);
document.addEventListener("focus", onFocusCapturePhase, true);
document.addEventListener("blur", onBlurCapturePhase, true);
enterInsertModeIfElementIsFocused();
@@ -291,8 +291,10 @@ function onKeydown(event) {
}
else if (!insertMode && !findMode && keyChar)
{
- if (currentCompletionKeys.indexOf(keyChar) != -1)
+ if (currentCompletionKeys.indexOf(keyChar) != -1) {
event.preventDefault();
+ event.stopPropagation();
+ }
keyPort.postMessage(keyChar);
}