diff options
| author | Stephen Blott | 2015-08-22 11:50:36 +0100 | 
|---|---|---|
| committer | Stephen Blott | 2015-08-22 11:50:36 +0100 | 
| commit | 99c8eb517b89a7c1acc4d4f28dde1ce6f5c7713f (patch) | |
| tree | b341440b944a3a89a8676f56b1cd4dadbc7c87d3 | |
| parent | 207c1591073c1577c50d37cc551cb25994ceca03 (diff) | |
| download | vimium-99c8eb517b89a7c1acc4d4f28dde1ce6f5c7713f.tar.bz2 | |
Prevent perpetual scroll.
If we miss the keyup event while a smooth scroll is active (because the
focus changes), then we scroll forever.  This stops scrolling on blur.
Fixes #1788.
| -rw-r--r-- | content_scripts/scroller.coffee | 3 | 
1 files changed, 3 insertions, 0 deletions
| diff --git a/content_scripts/scroller.coffee b/content_scripts/scroller.coffee index 81c71fcd..271a7854 100644 --- a/content_scripts/scroller.coffee +++ b/content_scripts/scroller.coffee @@ -136,6 +136,9 @@ CoreScroller =          handlerStack.alwaysContinueBubbling =>            @keyIsDown = false            @time += 1 +      blur: => +        handlerStack.alwaysContinueBubbling => +          @time += 1 if event.target == window    # Return true if CoreScroller would not initiate a new scroll right now.    wouldNotInitiateScroll: -> @lastEvent?.repeat and Settings.get "smoothScroll" | 
