aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts/link_hints.coffee
diff options
context:
space:
mode:
authorStephen Blott2017-04-13 15:57:32 +0100
committerStephen Blott2017-04-18 05:50:51 +0100
commitb88ee579c4471d27dbb4aba59215f5e85b7d32a2 (patch)
tree5a019495f9a262c7bc45c08f74230a7496bf304d /content_scripts/link_hints.coffee
parentee83d1a9603a304c9328d3587e2db829fcec7aaf (diff)
downloadvimium-b88ee579c4471d27dbb4aba59215f5e85b7d32a2.tar.bz2
Avoid repeating Backspace and Delete keys.
Diffstat (limited to 'content_scripts/link_hints.coffee')
-rw-r--r--content_scripts/link_hints.coffee4
1 files changed, 2 insertions, 2 deletions
diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee
index 4481ae92..a95d2123 100644
--- a/content_scripts/link_hints.coffee
+++ b/content_scripts/link_hints.coffee
@@ -175,7 +175,7 @@ class LinkHintsMode
@hintMode.onExit (event) =>
if event?.type == "click" or (event?.type == "keydown" and
- (KeyboardUtils.isEscape(event) or event.key in ["Backspace", "Delete"]))
+ (KeyboardUtils.isEscape(event) or KeyboardUtils.isBackspace event))
HintCoordinator.sendMessage "exit", isSuccess: false
# Note(philc): Append these markers as top level children instead of as child nodes to the link itself,
@@ -266,7 +266,7 @@ class LinkHintsMode
# Therefore, we ensure that it's always removed when hint mode exits. See #1911 and #1926.
@hintMode.onExit -> handlerStack.remove handlerId
- else if event.key in [ "Backspace", "Delete" ]
+ else if KeyboardUtils.isBackspace event
if @markerMatcher.popKeyChar()
@updateVisibleMarkers()
else