diff options
| author | mrmr1993 | 2015-06-03 05:21:56 +0100 | 
|---|---|---|
| committer | mrmr1993 | 2015-06-10 20:59:14 +0100 | 
| commit | e0f2c18286e5485963e40d3711a0cf41d987541e (patch) | |
| tree | 65f1814943f42efe5f85e09978fea4b2309b867f | |
| parent | 767ea409e57169cd31ea826398ffa59e07eea353 (diff) | |
| download | vimium-e0f2c18286e5485963e40d3711a0cf41d987541e.tar.bz2 | |
Inline HUD.findModeKeydown at its sole callsite
| -rw-r--r-- | content_scripts/hud.coffee | 8 | 
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() | 
