aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--content_scripts/hud.coffee8
1 files changed, 3 insertions, 5 deletions
diff --git a/content_scripts/hud.coffee b/content_scripts/hud.coffee
index 33656210..30dece24 100644
--- a/content_scripts/hud.coffee
+++ b/content_scripts/hud.coffee
@@ -60,6 +60,8 @@ HUD =
@tween.fade 0, 150, => @hide true, updateIndicator
hideFindMode: (data) ->
+ window.scrollTo @findMode.scrollX, @findMode.scrollY if @findMode.options.returnToViewport
+
# An element element won't receive a focus event if the search landed on it while we were in the HUD
# iframe. To end up with the correct modes active, we create a focus/blur event manually after refocusing
# this window.
@@ -70,11 +72,7 @@ HUD =
focusNode?.focus()
findModeQuery.rawQuery = data.query
- @findModeKeydown data.event
-
- findModeKeydown: (event) ->
- window.scrollTo @findMode.scrollX, @findMode.scrollY if @findMode.options.returnToViewport
- postExit = null
+ {event} = data
if event.keyCode == keyCodes.enter
handleEnterForFindMode()