Bug 1584336 - Re-add the width attribute to the searchbar. r=dao a=lizzard
Differential Revision:
https://phabricator.services.mozilla.com/D47624
--- a/browser/components/search/content/searchbar.js
+++ b/browser/components/search/content/searchbar.js
@@ -783,17 +783,22 @@
document.popupNode = null;
let { width } = this.getBoundingClientRect();
// Ensure the panel is wide enough to fit at least 3 engines.
if (this.oneOffButtons) {
width = Math.max(width, this.oneOffButtons.buttonWidth * 3);
}
+
+ // The CSS minWidth is necessary for the searchbar to be the correct
+ // width in the overflow menu. The width attribute is necessary for
+ // _invalidate().
popup.style.minWidth = width + "px";
+ popup.setAttribute("width", width);
popup._invalidate();
popup.openPopup(this, "after_start");
}
};
this.textbox.openSearch = () => {