Bug 1907146 - Ensure SearchModeSwitcher detects searchmode changes. r=urlbar-reviewers,mak
Differential Revision: https://phabricator.services.mozilla.com/D216232
This commit is contained in:
@@ -112,7 +112,6 @@ export class UrlbarInput {
|
||||
eventTelemetryCategory: options.eventTelemetryCategory,
|
||||
});
|
||||
this.view = new lazy.UrlbarView(this);
|
||||
this.searchModeSwitcher = new lazy.SearchModeSwitcher(this);
|
||||
this.valueIsTyped = false;
|
||||
this.formHistoryName = DEFAULT_FORM_HISTORY_NAME;
|
||||
this.lastQueryContextPromise = Promise.resolve();
|
||||
@@ -262,6 +261,7 @@ export class UrlbarInput {
|
||||
this._initCopyCutController();
|
||||
this._initPasteAndGo();
|
||||
this._initStripOnShare();
|
||||
this.searchModeSwitcher = new lazy.SearchModeSwitcher(this);
|
||||
|
||||
// Tracks IME composition.
|
||||
this._compositionState = lazy.UrlbarUtils.COMPOSITION.NONE;
|
||||
@@ -1885,7 +1885,6 @@ export class UrlbarInput {
|
||||
// Enter search mode if the browser is selected.
|
||||
if (browser == this.window.gBrowser.selectedBrowser) {
|
||||
this._updateSearchModeUI(searchMode);
|
||||
this.inputField.dispatchEvent(new CustomEvent("searchmodechanged"));
|
||||
if (searchMode) {
|
||||
// Set userTypedValue to the query string so that it's properly restored
|
||||
// when switching back to the current tab and across sessions.
|
||||
@@ -1978,6 +1977,7 @@ export class UrlbarInput {
|
||||
|
||||
set searchMode(searchMode) {
|
||||
this.setSearchMode(searchMode, this.window.gBrowser.selectedBrowser);
|
||||
this.searchModeSwitcher.onSearchModeChanged();
|
||||
}
|
||||
|
||||
getBrowserState(browser) {
|
||||
|
||||
Reference in New Issue
Block a user