summaryrefslogtreecommitdiffstats
path: root/browser/components/search/content/searchbar.js
diff options
context:
space:
mode:
Diffstat (limited to 'browser/components/search/content/searchbar.js')
-rw-r--r--browser/components/search/content/searchbar.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/browser/components/search/content/searchbar.js b/browser/components/search/content/searchbar.js
index c872236472..e0fe7f41e3 100644
--- a/browser/components/search/content/searchbar.js
+++ b/browser/components/search/content/searchbar.js
@@ -12,6 +12,7 @@
const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
+ BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
FormHistory: "resource://gre/modules/FormHistory.sys.mjs",
SearchSuggestionController:
"resource://gre/modules/SearchSuggestionController.sys.mjs",
@@ -317,7 +318,7 @@
if (aEvent.button == 2) {
return;
}
- where = whereToOpenLink(aEvent, false, true);
+ where = lazy.BrowserUtils.whereToOpenLink(aEvent, false, true);
if (
newTabPref &&
!aEvent.altKey &&
@@ -885,12 +886,13 @@
goDoCommand("cmd_paste");
this.handleSearchCommand(event);
break;
- case clearHistoryItem:
+ case clearHistoryItem: {
let param = this.textbox.getAttribute("autocompletesearchparam");
lazy.FormHistory.update({ op: "remove", fieldname: param });
this.textbox.value = "";
break;
- default:
+ }
+ default: {
let cmd = event.originalTarget.getAttribute("cmd");
if (cmd) {
let controller =
@@ -898,6 +900,7 @@
controller.doCommand(cmd);
}
break;
+ }
}
});
}