aboutsummaryrefslogtreecommitdiffstats
path: root/linkHints.js
diff options
context:
space:
mode:
authorIlya2011-06-16 14:25:27 -0700
committerIlya2011-06-16 14:25:27 -0700
commit94b9a5c70343bccd94ccd69996b811c77c04d539 (patch)
treecb856e90ac5d9360a7d8031d01560a7ab358c03d /linkHints.js
parentd42f22ec417a508bbb665148333234a270af3cd9 (diff)
parentadb57f335af4c1245db6245ab96e5ead4370df31 (diff)
downloadvimium-94b9a5c70343bccd94ccd69996b811c77c04d539.tar.bz2
Merge pull request #357 from rgsmith1980/master
GitHub logo hinting
Diffstat (limited to 'linkHints.js')
-rw-r--r--linkHints.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/linkHints.js b/linkHints.js
index c8c743ea..9219fee6 100644
--- a/linkHints.js
+++ b/linkHints.js
@@ -128,7 +128,9 @@ var linkHints = {
// but floated elements. Check for this.
if (clientRect && (clientRect.width == 0 || clientRect.height == 0)) {
for (var j = 0, childrenCount = element.children.length; j < childrenCount; j++) {
- if (window.getComputedStyle(element.children[j], null).getPropertyValue('float') == 'none')
+ var computedStyle = window.getComputedStyle(element.children[j], null);
+ // Ignore child elements which are not floated and not absolutely positioned for parent elements with zero width/height
+ if (computedStyle.getPropertyValue('float') == 'none' && computedStyle.getPropertyValue('position') != 'absolute')
continue;
var childClientRect = element.children[j].getClientRects()[0];
if (!this.isVisible(element.children[j], childClientRect))