aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts
diff options
context:
space:
mode:
authorStephen Blott2016-03-27 06:22:14 +0100
committerStephen Blott2016-03-28 05:59:47 +0100
commitd2b14cbe04acf1e03f988aa3ef8deb78c0480782 (patch)
treef4d6e8f89c2a4f26c031aab523f483cf4d9ba7ac /content_scripts
parent32ebe749a0242deda845558340aee02bafa83e76 (diff)
downloadvimium-d2b14cbe04acf1e03f988aa3ef8deb78c0480782.tar.bz2
Better test for scrollability.
Testing the `scrollHeight` is cheaper than testing scrollability. There are a lot of non-scrollabile divs, so it makes sense to use this cheaper test as a filter.
Diffstat (limited to 'content_scripts')
-rw-r--r--content_scripts/link_hints.coffee2
1 files changed, 1 insertions, 1 deletions
diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee
index ced90cc5..1795f0f7 100644
--- a/content_scripts/link_hints.coffee
+++ b/content_scripts/link_hints.coffee
@@ -262,7 +262,7 @@ LocalHints =
reason = "Frame."
when "div", "ol", "ul"
isClickable ||=
- if Scroller.isScrollableElement element
+ if element.clientHeight < element.scrollHeight and Scroller.isScrollableElement element
reason = "Scroll."
# An element with a class name containing the text "button" might be clickable. However, real clickables