diff --git a/common/content/commandline.js b/common/content/commandline.js index 502178e8..d184d254 100644 --- a/common/content/commandline.js +++ b/common/content/commandline.js @@ -1643,7 +1643,7 @@ const ItemList = Class("ItemList", { , 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; diff --git a/common/content/hints.js b/common/content/hints.js index b66b3d51..f145f7f0 100644 --- a/common/content/hints.js +++ b/common/content/hints.js @@ -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);