From 026c90ccff6f40cdc370c11339cdfab4a5e6b7b9 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sat, 18 Nov 2017 12:17:09 +0000 Subject: Make clear that element need not be provided here. --- content_scripts/scroller.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'content_scripts') diff --git a/content_scripts/scroller.coffee b/content_scripts/scroller.coffee index e2e05722..f65062e4 100644 --- a/content_scripts/scroller.coffee +++ b/content_scripts/scroller.coffee @@ -95,7 +95,7 @@ findScrollableElement = (element, direction, amount, factor) -> # On some pages, the scrolling element is not actually scrollable. Here, we search the document for the # largest visible element which does scroll vertically. This is used to initialize activatedElement. See # #1358. -firstScrollableElement = (element) -> +firstScrollableElement = (element = null) -> unless element scrollingElement = getScrollingElement() if doesScroll(scrollingElement, "y", 1, 1) or doesScroll(scrollingElement, "y", -1, 1) -- cgit v1.2.3