1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 20:17:59 +01:00

Weed out more invisible elements when hinting. Closes issue #12.

This commit is contained in:
Kris Maglione
2010-09-24 17:28:50 -04:00
parent 940c9d7434
commit 6e0aa6a23b
2 changed files with 2 additions and 2 deletions

View File

@@ -1643,7 +1643,7 @@ const ItemList = Class("ItemList", {
</div>
</div>, this._divNodes);
this._doc.body.replaceChild(this._div, this._doc.body.firstChild);
this._div.scrollIntoView(true);
util.scrollIntoView(this._div);
this._items.contextList.forEach(function init_eachContext(context) {
delete context.cache.nodes;

View File

@@ -269,7 +269,7 @@ const Hints = Module("hints", {
// TODO: for iframes, this calculation is wrong
let rect = elem.getBoundingClientRect();
if (!rect || rect.top > height || rect.bottom < 0 || rect.left > width || rect.right < 0)
if (!rect || !rect.width || !rect.height || rect.top > height || rect.bottom < 0 || rect.left > width || rect.right < 0)
continue;
let computedStyle = doc.defaultView.getComputedStyle(elem, null);