From 59daec7b9914729b60e1d783bb1143499421fae6 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sun, 7 Jun 2015 10:53:25 +0100 Subject: Exit link-hint mode on click or scroll. Exit on click because, if the user is clicking stuff, then they're probably no longer interested in selecting links. Exit on scroll because, if the user is scrolling, then the link hints can all go out of the viewport. --- content_scripts/vimium_frontend.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'content_scripts/vimium_frontend.coffee') diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 3055ecea..8c28b4e6 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -192,7 +192,7 @@ window.installListeners = -> unless installedListeners # Key event handlers fire on window before they do on document. Prefer window for key events so the page # can't set handlers to grab the keys before us. - for type in [ "keydown", "keypress", "keyup", "click", "focus", "blur", "mousedown" ] + for type in [ "keydown", "keypress", "keyup", "click", "focus", "blur", "mousedown", "scroll" ] do (type) -> installListener window, type, (event) -> handlerStack.bubbleEvent type, event installListener document, "DOMActivate", (event) -> handlerStack.bubbleEvent 'DOMActivate', event installedListeners = true -- cgit v1.2.3