Skip to content

Commit

Permalink
noop: safer code
Browse files Browse the repository at this point in the history
  • Loading branch information
gdh1995 committed Jan 5, 2020
1 parent e99f58f commit a8e3a25
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion content_scripts/hud.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ HUD =
document.activeElement.blur() if document.activeElement == @hudUI?.iframeElement

giveUpFocus: ->
if @hudUI.showing
# On Firefox, if an <iframe> disappears when it's focused, then it will keep "focused",
# which means keyboard events will always be dispatched to the HUD iframe
if @hudUI?.showing
@hudUI.iframeElement.blur()
window.focus()

Expand Down

0 comments on commit a8e3a25

Please sign in to comment.