aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2017-04-21 06:55:19 +0100
committerGitHub2017-04-21 06:55:19 +0100
commit8359488e8f3255a57d0f8241790cf6921826f1be (patch)
treeb0d27897f01faf8149a470213f80a1c1fe08bffd
parente3cce413029dd5efa718a48a057d0bcf77d31fb9 (diff)
parentdf72a1be0213d211645f39f1ec6aeeba4d8e7896 (diff)
downloadvimium-8359488e8f3255a57d0f8241790cf6921826f1be.tar.bz2
Merge pull request #2484 from mrmr1993/ff-focus-top-frame
Fix gF (mainFrame) command on Firefox
-rw-r--r--content_scripts/vimium_frontend.coffee3
1 files changed, 3 insertions, 0 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee
index cdb23352..e84346e1 100644
--- a/content_scripts/vimium_frontend.coffee
+++ b/content_scripts/vimium_frontend.coffee
@@ -315,6 +315,9 @@ focusThisFrame = (request) ->
chrome.runtime.sendMessage handler: "nextFrame"
return
window.focus()
+ # On Firefox, window.focus doesn't always draw focus back from a child frame (bug 554039).
+ # We blur the active element if it is an iframe, which gives the window back focus as intended.
+ document.activeElement.blur() if document.activeElement.tagName.toLowerCase() == "iframe"
flashFrame() if request.highlight
extend window,