mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 21:52:27 +01:00
Closes issue #396.
This commit is contained in:
@@ -292,11 +292,15 @@ var HintSession = Class("HintSession", CommandMode, {
|
|||||||
|
|
||||||
function isVisible(elem) {
|
function isVisible(elem) {
|
||||||
let rect = elem.getBoundingClientRect();
|
let rect = elem.getBoundingClientRect();
|
||||||
if (!rect || !rect.width || !rect.height ||
|
if (!rect ||
|
||||||
rect.top > offsets.bottom || rect.bottom < offsets.top ||
|
rect.top > offsets.bottom || rect.bottom < offsets.top ||
|
||||||
rect.left > offsets.right || rect.right < offsets.left)
|
rect.left > offsets.right || rect.right < offsets.left)
|
||||||
return false;
|
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);
|
let computedStyle = doc.defaultView.getComputedStyle(elem, null);
|
||||||
if (computedStyle.visibility != "visible" || computedStyle.display == "none")
|
if (computedStyle.visibility != "visible" || computedStyle.display == "none")
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user