Skip to content

Commit

Permalink
Fix frame-focus detection.
Browse files Browse the repository at this point in the history
In b05276e, I inadvertently moved the
focus handler from window to document.  As a consequence, detectFocus
(now registerFocus) wasn't being called when expected.
  • Loading branch information
smblott-github committed Mar 15, 2015
1 parent c0208ac commit e5a2355
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content_scripts/vimium_frontend.coffee
Expand Up @@ -209,7 +209,7 @@ window.initializeWhenEnabled = ->
for type in [ "keydown", "keypress", "keyup", "click", "focus", "blur", "mousedown" ]
do (type) -> installListener window, type, (event) -> handlerStack.bubbleEvent type, event
installListener document, "DOMActivate", (event) -> handlerStack.bubbleEvent 'DOMActivate', event
installListener document, "focus", detectFocus
installListener window, "focus", registerFocus
installedListeners = true
FindModeHistory.init()

Expand All @@ -229,7 +229,7 @@ getActiveState = ->
#
# The backend needs to know which frame has focus.
#
detectFocus = ->
registerFocus = ->
# settings may have changed since the frame last had focus
settings.load()
chrome.runtime.sendMessage({ handler: "frameFocused", frameId: frameId })
Expand Down

0 comments on commit e5a2355

Please sign in to comment.