aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormrmr19932015-07-26 22:15:53 +0100
committermrmr19932015-07-26 22:29:53 +0100
commitefb80f9b1cc60f0acdc733a2d42227eb566f909a (patch)
tree6368a3360a79bf16724a4db2f1c67b5703aac9eb
parent51b21408870fbcd2e59c806a24082d9bdd5c5e84 (diff)
downloadvimium-efb80f9b1cc60f0acdc733a2d42227eb566f909a.tar.bz2
Only apply passkeys to single character keys explicitly
Before this change, a string in KeyboardUtils.keyNames could have the key it represents disabled if * its letters were in alphabetical order, and * the user has set all of its letters as passkeys, with none in between. For example, imagining that "del" (for delete) was in KeyboardUtils.keyNames, the passkeys "dpyl0e" would cause the delete key to be a passkey too. This commit fixes the issue by only applying passkeys when keyChar is a single character.
-rw-r--r--content_scripts/mode_passkeys.coffee2
1 files changed, 1 insertions, 1 deletions
diff --git a/content_scripts/mode_passkeys.coffee b/content_scripts/mode_passkeys.coffee
index 1ed69ac2..631eb621 100644
--- a/content_scripts/mode_passkeys.coffee
+++ b/content_scripts/mode_passkeys.coffee
@@ -12,7 +12,7 @@ class PassKeysMode extends Mode
# passKey, then 'gt' and '99t' will neverthless be handled by Vimium.
handleKeyChar: (event, keyChar) ->
return @continueBubbling if event.altKey or event.ctrlKey or event.metaKey
- if keyChar and not @keyQueue and 0 <= @passKeys.indexOf keyChar
+ if keyChar and not @keyQueue and keyChar.length == 1 and 0 <= @passKeys.indexOf keyChar
@stopBubblingAndTrue
else
@continueBubbling