aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--content_scripts/scroller.coffee2
1 files changed, 1 insertions, 1 deletions
diff --git a/content_scripts/scroller.coffee b/content_scripts/scroller.coffee
index 5f10ab65..58b0398d 100644
--- a/content_scripts/scroller.coffee
+++ b/content_scripts/scroller.coffee
@@ -82,7 +82,7 @@ findScrollableElement = (element, direction, amount, factor) ->
while element != document.body and
not (doesScroll(element, direction, amount, factor) and shouldScroll(element, direction))
element = (DomUtils.getContainingElement element) ? document.body
- element
+ if element == document.body then firstScrollableElement element else element
# On some pages, document.body is not scrollable. Here, we search the document for the largest visible
# element which does scroll vertically. This is used to initialize activatedElement. See #1358.