Skip to content

Commit cd58476

Browse files
gdh1995philc
authored andcommitted
merge giveUpFocus into unfocusIfFocused
in fact, the old `unfocusIfFocused` has been broken for a while, since hud iframe is inside a shadowRoot on Firefox 63+.
1 parent afed4d2 commit cd58476

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

content_scripts/hud.coffee

-3
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,6 @@ HUD =
111111
@pasteListener data
112112

113113
unfocusIfFocused: ->
114-
document.activeElement.blur() if document.activeElement == @hudUI?.iframeElement
115-
116-
giveUpFocus: ->
117114
# On Firefox, if an <iframe> disappears when it's focused, then it will keep "focused",
118115
# which means keyboard events will always be dispatched to the HUD iframe
119116
if @hudUI?.showing

content_scripts/mode_find.coffee

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class FindMode extends Mode
7979
HUD.showFindMode this
8080

8181
exit: (event) ->
82-
HUD.giveUpFocus()
82+
HUD.unfocusIfFocused()
8383
super()
8484
FindMode.handleEscape() if event
8585

0 commit comments

Comments
 (0)