aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts
diff options
context:
space:
mode:
authorStephen Blott2015-01-31 12:13:48 +0000
committerStephen Blott2015-01-31 12:17:10 +0000
commit70c7cb66e96305b0f8bbd8687fe8272d989ed3d9 (patch)
tree38f0cf2490a3ef023583acf4758b4169859bdeee /content_scripts
parentfebe30806b9c2e4e4a82ea8552b060fcbdd6cc5e (diff)
downloadvimium-70c7cb66e96305b0f8bbd8687fe8272d989ed3d9.tar.bz2
Revert "Fix scrolling issue."
This reverts commit 90d2addc9b8f95f9272f8c2a77bdaf9dfebc0fa8. Nope. This is bad. It fixes the issue referred to in the commit record, but breaks scrolling out of text areas. With 90d2addc9b8f95f9272f8c2a77bdaf9dfebc0fa8: - Start editing in a text area, add enough text that it scrolls. - `Escape` - `k`, `k`, `k`, ... We expect first the text areas to scroll, then -- when it reaches the top -- the document to scroll. However, with 90d2addc9b8f95f9272f8c2a77bdaf9dfebc0fa8, we get stuck in the text area.
Diffstat (limited to 'content_scripts')
-rw-r--r--content_scripts/scroller.coffee6
1 files changed, 1 insertions, 5 deletions
diff --git a/content_scripts/scroller.coffee b/content_scripts/scroller.coffee
index 17a49464..f26f0b73 100644
--- a/content_scripts/scroller.coffee
+++ b/content_scripts/scroller.coffee
@@ -75,11 +75,7 @@ doesScroll = (element, direction, amount, factor) ->
# definitely scrolling backwards, so a delta of -1 will do. For absolute scrolls, factor is always 1.
delta = factor * getDimension(element, direction, amount) || -1
delta = getSign delta # 1 or -1
- for change in [ delta, -delta ]
- if performScroll element, direction, change
- performScroll element, direction, -change
- return true
- false
+ performScroll(element, direction, delta) and performScroll(element, direction, -delta)
# From element and its parents, find the first which we should scroll and which does scroll.
findScrollableElement = (element, direction, amount, factor) ->