diff options
| author | int3 | 2010-04-07 21:39:18 +0000 |
|---|---|---|
| committer | ilya | 2010-04-18 21:59:36 -0700 |
| commit | 89e1336d1e56543719f3cf9e43189ff9da708a68 (patch) | |
| tree | 6b955ea0d4caa045c338ca0f7a5a6ce673df81ae /linkHints.js | |
| parent | fff51fd109130bd956fa8d2a2702c969fa8b728d (diff) | |
| download | vimium-89e1336d1e56543719f3cf9e43189ff9da708a68.tar.bz2 | |
Fix visibility tests
Diffstat (limited to 'linkHints.js')
| -rw-r--r-- | linkHints.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/linkHints.js b/linkHints.js index e73fc932..a2d28dda 100644 --- a/linkHints.js +++ b/linkHints.js @@ -84,12 +84,16 @@ function getVisibleClickableElements() { if (boundingRect.width < 3 || boundingRect.height < 3) continue; - // eliminate invisible elements + // eliminate invisible elements (see test_harnesses/visibility_test.html) var computedStyle = window.getComputedStyle(element, null); if (computedStyle.getPropertyValue('visibility') != 'visible' || computedStyle.getPropertyValue('display') == 'none') continue; + var clientRect = element.getClientRects()[0]; + if (!clientRect) + continue; + visibleElements.push(element); } return visibleElements; |
