diff --git a/common/content/hints.js b/common/content/hints.js index 6cf44dfd..e7b7622c 100644 --- a/common/content/hints.js +++ b/common/content/hints.js @@ -292,11 +292,15 @@ var HintSession = Class("HintSession", CommandMode, { function isVisible(elem) { let rect = elem.getBoundingClientRect(); - if (!rect || !rect.width || !rect.height || + if (!rect || rect.top > offsets.bottom || rect.bottom < offsets.top || rect.left > offsets.right || rect.right < offsets.left) return false; + if (!rect.width || !rect.height) + if (!Array.some(elem.childNodes, function (elem) util.computedStyle(elem).float != "none" && isVisible(elem))) + return false; + let computedStyle = doc.defaultView.getComputedStyle(elem, null); if (computedStyle.visibility != "visible" || computedStyle.display == "none") return false;