commit 19d09d987b4c0c5c36f9e173ff7b8ac59af5afd7 parent 49f4b9e956a20a316e4591c5062b8367e0237a1b Author: Moritz Beier <mbeier@mozilla.com> Date: Wed, 17 Dec 2025 13:28:09 +0000 Bug 2006200 - Exit search mode during searchbar uninit to fix intermittent test failures. r=dao,urlbar-reviewers Differential Revision: https://phabricator.services.mozilla.com/D276829 Diffstat:
| M | browser/components/urlbar/content/UrlbarInput.mjs | | | 5 | +++++ |
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/browser/components/urlbar/content/UrlbarInput.mjs b/browser/components/urlbar/content/UrlbarInput.mjs @@ -460,6 +460,11 @@ export class UrlbarInput extends HTMLElement { #uninit() { if (this.sapName == "searchbar") { this.parentNode.removeAttribute("overflows"); + + // Exit search mode to make sure it doesn't become stale while the + // searchbar is invisible. Otherwise, the engine might get deleted + // but we don't notice because the search service observer is inactive. + this.searchMode = null; } if (this._copyCutController) {