diff options
Diffstat (limited to 'linkHints.js')
| -rw-r--r-- | linkHints.js | 4 |
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)) |
