aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts/vimium_frontend.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'content_scripts/vimium_frontend.coffee')
-rw-r--r--content_scripts/vimium_frontend.coffee3
1 files changed, 2 insertions, 1 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee
index 26aa3492..ff27c8a4 100644
--- a/content_scripts/vimium_frontend.coffee
+++ b/content_scripts/vimium_frontend.coffee
@@ -176,7 +176,7 @@ onFocus = forTrusted (event) ->
# We install these listeners directly (that is, we don't use installListener) because we still need to receive
# events when Vimium is not enabled.
window.addEventListener "focus", onFocus
-window.addEventListener "hashchange", -> checkEnabledAfterURLChange()
+window.addEventListener "hashchange", checkEnabledAfterURLChange
initializeOnDomReady = ->
# Tell the background page we're in the domReady state.
@@ -307,6 +307,7 @@ checkIfEnabledForUrl = do ->
# When we're informed by the background page that a URL in this tab has changed, we check if we have the
# correct enabled state (but only if this frame has the focus).
checkEnabledAfterURLChange = forTrusted ->
+ Scroller.reset() # The URL changing feels like navigation to the user, so reset the scroller (see #3119).
checkIfEnabledForUrl() if windowIsFocused()
# If we are in the help dialog iframe, then HelpDialog is already defined with the necessary functions.