mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 10:45:42 +00:00
Bug 1583162 - Remove 'Show Suggestions' from the search bar context menu as it doesn't work correctly, and using prefs UI is better. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D48971 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
c558bed276
commit
50b98750a5
@ -83,7 +83,6 @@
|
||||
|
||||
this._menupopup = null;
|
||||
this._pasteAndSearchMenuItem = null;
|
||||
this._suggestMenuItem = null;
|
||||
|
||||
this._setupTextboxEventListeners();
|
||||
this._initTextbox();
|
||||
@ -677,11 +676,6 @@
|
||||
|
||||
BrowserSearch.searchBar._textbox.closePopup();
|
||||
|
||||
let suggestEnabled = Services.prefs.getBoolPref(
|
||||
"browser.search.suggest.enabled"
|
||||
);
|
||||
this._suggestMenuItem.setAttribute("checked", suggestEnabled);
|
||||
|
||||
let controller = document.commandDispatcher.getControllerForCommand(
|
||||
"cmd_paste"
|
||||
);
|
||||
@ -854,7 +848,6 @@
|
||||
<menuitem label="&selectAllCmd.label;" accesskey="&selectAllCmd.accesskey;" cmd="cmd_selectAll"/>
|
||||
<menuseparator/>
|
||||
<menuitem class="searchbar-clear-history"/>
|
||||
<menuitem class="searchbar-toggle-suggest" type="checkbox" autocheck="false"/>
|
||||
`;
|
||||
|
||||
this._menupopup = this.querySelector(".textbox-contextmenu");
|
||||
@ -882,16 +875,6 @@
|
||||
this._stringBundle.getString("cmd_clearHistory_accesskey")
|
||||
);
|
||||
|
||||
this._suggestMenuItem = frag.querySelector(".searchbar-toggle-suggest");
|
||||
this._suggestMenuItem.setAttribute(
|
||||
"label",
|
||||
this._stringBundle.getString("cmd_showSuggestions")
|
||||
);
|
||||
this._suggestMenuItem.setAttribute(
|
||||
"accesskey",
|
||||
this._stringBundle.getString("cmd_showSuggestions_accesskey")
|
||||
);
|
||||
|
||||
this._menupopup.appendChild(frag);
|
||||
|
||||
this._menupopup.addEventListener("command", event => {
|
||||
@ -907,15 +890,6 @@
|
||||
);
|
||||
this.textbox.value = "";
|
||||
break;
|
||||
case this._suggestMenuItem:
|
||||
let enabled = Services.prefs.getBoolPref(
|
||||
"browser.search.suggest.enabled"
|
||||
);
|
||||
Services.prefs.setBoolPref(
|
||||
"browser.search.suggest.enabled",
|
||||
!enabled
|
||||
);
|
||||
break;
|
||||
default:
|
||||
let cmd = event.originalTarget.getAttribute("cmd");
|
||||
if (cmd) {
|
||||
|
@ -16,9 +16,6 @@ cmd_pasteAndSearch=Paste & Search
|
||||
cmd_clearHistory=Clear Search History
|
||||
cmd_clearHistory_accesskey=H
|
||||
|
||||
cmd_showSuggestions=Show Suggestions
|
||||
cmd_showSuggestions_accesskey=S
|
||||
|
||||
# LOCALIZATION NOTE (cmd_addFoundEngine): %S is replaced by the name of
|
||||
# a search engine offered by a web page. Each engine is displayed as a
|
||||
# menuitem at the bottom of the search panel.
|
||||
|
Loading…
Reference in New Issue
Block a user