From 240433c3b50fc01e72d840b4b6062334e208b59a Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Mon, 4 Apr 2016 06:31:49 +0100 Subject: Do not offer activated element as scrollable. Scrollable divs are offered via link hints. It makes no sense to offer the current activated element for selection - so don't. On a "normal" page where there's just one scrollable thing, document.body, this means that we no longer offer the unnecessary "Scroll." hint. --- content_scripts/scroller.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'content_scripts') diff --git a/content_scripts/scroller.coffee b/content_scripts/scroller.coffee index 7b46bab0..6965f706 100644 --- a/content_scripts/scroller.coffee +++ b/content_scripts/scroller.coffee @@ -259,8 +259,10 @@ Scroller = amount = getDimension(element,direction,pos) - element[scrollProperties[direction].axisName] CoreScroller.scroll element, direction, amount + # Is element scrollable and not the activated element? isScrollableElement: (element) -> - isScrollableElement element + activatedElement ||= (document.body and firstScrollableElement()) or document.body + element != activatedElement and isScrollableElement element # Scroll the top, bottom, left and right of element into view. The is used by visual mode to ensure the # focus remains visible. -- cgit v1.2.3