aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2017-11-18 12:41:04 +0000
committerGitHub2017-11-18 12:41:04 +0000
commite8d0fe5f3f87b2ad753975a4485db348af7853fc (patch)
tree882e8af2213ea1c6e5e42e4f113fb6c3611a3cf8
parent72d7af375fbf4ba7fd300ae4602e45a0c2652e59 (diff)
parent64995cc4f4777a3b1899caaf2992862f9f02448b (diff)
downloadvimium-e8d0fe5f3f87b2ad753975a4485db348af7853fc.tar.bz2
Merge pull request #2802 from mrmr1993/pr/link-hints-pass-non-printing-keys
Don't suppress default action for non-printing keys in link hints
-rw-r--r--content_scripts/link_hints.coffee2
-rw-r--r--lib/dom_utils.coffee8
2 files changed, 7 insertions, 3 deletions
diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee
index 1e4670dd..96370bb4 100644
--- a/content_scripts/link_hints.coffee
+++ b/content_scripts/link_hints.coffee
@@ -290,7 +290,7 @@ class LinkHintsMode
@markerMatcher.pushKeyChar keyChar
@updateVisibleMarkers()
else
- return
+ return handlerStack.suppressPropagation
handlerStack.suppressEvent
diff --git a/lib/dom_utils.coffee b/lib/dom_utils.coffee
index 95b9f4b3..67d5a44c 100644
--- a/lib/dom_utils.coffee
+++ b/lib/dom_utils.coffee
@@ -363,8 +363,12 @@ DomUtils =
@remove() if event.target == window
handlerStack.continueBubbling
callback?()
- @suppressEvent event
- handlerStack.suppressEvent
+ if suppressPropagation
+ DomUtils.suppressPropagation event
+ handlerStack.suppressPropagation
+ else
+ DomUtils.suppressEvent event
+ handlerStack.suppressEvent
# Polyfill for selection.type (which is not available in Firefox).
getSelectionType: (selection = document.getSelection()) ->