1
0
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:
Doug Kearns
2008-08-24 23:10:07 +00:00
parent 1704adc334
commit f2bce0b115

View File

@@ -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")