aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--content_scripts/mode.coffee4
-rw-r--r--content_scripts/mode_passkeys.coffee6
-rw-r--r--content_scripts/vimium_frontend.coffee2
3 files changed, 6 insertions, 6 deletions
diff --git a/content_scripts/mode.coffee b/content_scripts/mode.coffee
index 0fcab675..a56a3215 100644
--- a/content_scripts/mode.coffee
+++ b/content_scripts/mode.coffee
@@ -212,7 +212,7 @@ class Mode
# BadgeMode is a pseudo mode for triggering badge updates on focus changes and state updates. It sits at the
# bottom of the handler stack, and so it receives state changes *after* all other modes, and can override the
# badge choice of the other active modes.
-# Note. We also create the the one-and-only instance, here.
+# Note. We create the the one-and-only instance, here.
new class BadgeMode extends Mode
constructor: () ->
super
@@ -236,7 +236,7 @@ new class BadgeMode extends Mode
# KeySuppressor is a pseudo mode (near the bottom of the stack) which suppresses keyboard events tagged with
# the "vimium_suppress_event" property. This allows modes higher up in the stack to tag events for
# suppression, but only after verifying that no other mode (notably, normal mode) wants to handle the event.
-# Note. We also create the the one-and-only instance, here.
+# Note. We create the the one-and-only instance, here.
new class KeySuppressor extends Mode
constructor: ->
super
diff --git a/content_scripts/mode_passkeys.coffee b/content_scripts/mode_passkeys.coffee
index c4df06dc..dde91c13 100644
--- a/content_scripts/mode_passkeys.coffee
+++ b/content_scripts/mode_passkeys.coffee
@@ -12,8 +12,10 @@ class PassKeysMode extends Mode
# passKeys if the keyQueue is not empty. So, for example, if 't' is a passKey, then 'gt' and '99t' will
# neverthless be handled by vimium.
handleKeyChar: (keyChar) ->
- @alwaysContinueBubbling =>
- event.vimium_suppress_normal_mode = true if keyChar and not @keyQueue and 0 <= @passKeys.indexOf keyChar
+ if keyChar and not @keyQueue and 0 <= @passKeys.indexOf keyChar
+ @stopBubblingAndTrue
+ else
+ @continueBubbling
configure: (request) ->
@keyQueue = request.keyQueue if request.keyQueue?
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee
index 0da59f03..1406b1e7 100644
--- a/content_scripts/vimium_frontend.coffee
+++ b/content_scripts/vimium_frontend.coffee
@@ -462,7 +462,6 @@ KeydownEvents =
#
onKeypress = (event) ->
- return true if event.vimium_suppress_normal_mode
keyChar = ""
# Ignore modifier keys by themselves.
@@ -492,7 +491,6 @@ onKeypress = (event) ->
return true
onKeydown = (event) ->
- return true if event.vimium_suppress_normal_mode
keyChar = ""
# handle special keys, and normal input keys with modifiers being pressed. don't handle shiftKey alone (to