Bug 1357800 - The One-Off search buttons not visible in the search bar. r=florian
Rebuild the one-off search buttons when the theme changes. See
bug 1357800 for details. Summary: On Linux, switching between themes can cause a row of buttons to disappear.
MozReview-Commit-ID: 8lfsUO00jYP
--- a/browser/components/search/content/search.xml
+++ b/browser/components/search/content/search.xml
@@ -1414,16 +1414,21 @@
menu.addEventListener("popuphidden", aEvent => {
this._ignoreMouseEvents = false;
aEvent.stopPropagation();
});
// Add weak referenced observers to invalidate our cached list of engines.
Services.prefs.addObserver("browser.search.hiddenOneOffs", this, true);
Services.obs.addObserver(this, "browser-search-engine-modified", true);
+
+ // Rebuild the buttons when the theme changes. See bug 1357800 for
+ // details. Summary: On Linux, switching between themes can cause a row
+ // of buttons to disappear.
+ Services.obs.addObserver(this, "lightweight-theme-changed", true);
]]></constructor>
<!-- This handles events outside the one-off buttons, like on the popup
and textbox. -->
<method name="handleEvent">
<parameter name="event"/>
<body><![CDATA[
switch (event.type) {