Bug 1320230 - When monitoring for the search popup hiding on click, use dispatchToMainThread to reset the status rather than setTimeout as it is more reliable. r?florian
MozReview-Commit-ID: Gjr0UXr1Mf7
--- a/browser/components/search/content/search.xml
+++ b/browser/components/search/content/search.xml
@@ -1122,19 +1122,19 @@
}
// Show the current default engine in the top header of the panel.
this.updateHeader();
]]></handler>
<handler event="popuphiding"><![CDATA[
this._isHiding = true;
- setTimeout(() => {
+ Services.tm.dispatchToMainThread(() => {
this._isHiding = false;
- }, 0);
+ });
]]></handler>
<!-- This handles clicks on the topmost "Foo Search" header in the
popup (hbox[anonid="searchbar-engine"]). -->
<handler event="click"><![CDATA[
if (event.button == 2) {
// Ignore right clicks.
return;