mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 20:12:27 +01:00
ignore hintable elements which are not displayed (Krishna Rajendran)
This commit is contained in:
@@ -107,6 +107,10 @@ liberator.Hints = function () //{{{
|
|||||||
if (!rect)
|
if (!rect)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
var computedStyle = doc.defaultView.getComputedStyle(elem, null);
|
||||||
|
if (computedStyle.getPropertyValue("visibility") == "hidden" || computedStyle.getPropertyValue("display") == "none")
|
||||||
|
continue;
|
||||||
|
|
||||||
// TODO: mozilla docs recommend localName instead of tagName
|
// TODO: mozilla docs recommend localName instead of tagName
|
||||||
tagname = elem.tagName.toLowerCase();
|
tagname = elem.tagName.toLowerCase();
|
||||||
if (tagname == "input" || tagname == "textarea")
|
if (tagname == "input" || tagname == "textarea")
|
||||||
|
|||||||
Reference in New Issue
Block a user