mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 22:07:58 +01:00
Weed out more invisible elements when hinting. Closes issue #12.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user