From 1d7cc1e43ada7baf394f58e2f0e586a5c252f7b3 Mon Sep 17 00:00:00 2001 From: mrmr1993 Date: Fri, 1 May 2015 07:02:06 +0100 Subject: Don't try and enter GrabBackFocus mode if the last click introduced focus --- content_scripts/vimium_frontend.coffee | 3 +++ 1 file changed, 3 insertions(+) (limited to 'content_scripts') diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 661ea1c4..e1d7b581 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -139,6 +139,9 @@ class GrabBackFocus extends Mode handlerStack.push _name: "GrabBackFocus-pushState-monitor" click: (event) -> + # If a focusable element is focused, the user must have clicked on it. Retain focus and bail. + return true if DomUtils.isFocusable document.activeElement + target = event.target while target # Often, a link which triggers a content load and url change with javascript will also have the new -- cgit v1.2.3