From b88ee579c4471d27dbb4aba59215f5e85b7d32a2 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Thu, 13 Apr 2017 15:57:32 +0100 Subject: Avoid repeating Backspace and Delete keys. --- content_scripts/link_hints.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'content_scripts') 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 -- cgit v1.2.3