diff options
| author | Phil Crosby | 2014-12-16 00:41:29 -0800 |
|---|---|---|
| committer | Phil Crosby | 2014-12-16 00:41:29 -0800 |
| commit | 08952256440a75875ca82fa21c0145930823a0ef (patch) | |
| tree | 000c95f6373bdd46f56c63603de3ec028426ff76 | |
| parent | 8200cec17975050ea872236136d916488890850e (diff) | |
| parent | 84bca6fb893f41c1c179b71c1c894bdd81b64127 (diff) | |
| download | vimium-08952256440a75875ca82fa21c0145930823a0ef.tar.bz2 | |
Merge pull request #1331 from smblott-github/fix-smooth-scrolling-properly
Fix scrolling in 1.47, all cases.
| -rw-r--r-- | content_scripts/scroller.coffee | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/content_scripts/scroller.coffee b/content_scripts/scroller.coffee index d3716a46..a2617289 100644 --- a/content_scripts/scroller.coffee +++ b/content_scripts/scroller.coffee @@ -34,13 +34,12 @@ getDimension = (el, direction, amount) -> else amount -# Perform a scroll. Return true if we successfully scrolled by the requested amount, and false otherwise. +# Perform a scroll. Return true if we successfully scrolled by any amount, and false otherwise. performScroll = (element, direction, amount) -> axisName = scrollProperties[direction].axisName before = element[axisName] element[axisName] += amount - scrollChange = element[axisName] - before - Math.abs(scrollChange - amount) <= 4 # At 25% zoom the scroll can be off by as much as 4. + element[axisName] != before # Test whether `element` should be scrolled. E.g. hidden elements should not be scrolled. shouldScroll = (element, direction) -> |
