commit cf6484339c8bd0a42fe9b21a6a8db058b472b34c parent 26b902903794531de8f13cc83b6f9793e08374b6 Author: Moritz Beier <mbeier@mozilla.com> Date: Mon, 24 Nov 2025 11:30:18 +0000 Bug 2001082 - Cannot access Unified Search Button from the new search bar widget after entering search mode. r=dao,urlbar-reviewers Differential Revision: https://phabricator.services.mozilla.com/D273266 Diffstat:
| M | browser/components/urlbar/content/UrlbarInput.mjs | | | 17 | ++++++----------- |
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/browser/components/urlbar/content/UrlbarInput.mjs b/browser/components/urlbar/content/UrlbarInput.mjs @@ -4251,18 +4251,13 @@ export class UrlbarInput extends HTMLElement { this._searchModeIndicatorTitle.removeAttribute("data-l10n-id"); } - if (this.#isAddressbar) { - if (!engineName && !source) { - try { - // This will throw before DOMContentLoaded in - // PrivateBrowsingUtils.privacyContextFromWindow because - // aWindow.docShell is null. - this.initPlaceHolder(true); - } catch (ex) {} - this.removeAttribute("searchmode"); - return; - } + if (!engineName && !source) { + this.removeAttribute("searchmode"); + this.initPlaceHolder(true); + return; + } + if (this.#isAddressbar) { if (engineName) { // Set text content for the search mode indicator. this._searchModeIndicatorTitle.textContent = engineName;