mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1120957 - fix the source of searches made with paste & search, r=gijs,bwinton
This commit is contained in:
parent
0ad5ebd649
commit
d1bddf61a3
@ -3490,6 +3490,12 @@ const BrowserSearch = {
|
||||
}
|
||||
},
|
||||
|
||||
pasteAndSearch: function (event) {
|
||||
BrowserSearch.searchBar.select();
|
||||
goDoCommand("cmd_paste");
|
||||
BrowserSearch.searchBar.handleSearchCommand(event);
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the search bar element if it is present in the toolbar, null otherwise.
|
||||
*/
|
||||
|
@ -521,6 +521,11 @@
|
||||
target.parentNode.classList.contains("search-panel-header")) {
|
||||
source = "header";
|
||||
}
|
||||
} else if (aEvent instanceof XULCommandEvent) {
|
||||
if (target.getAttribute("anonid") == "paste-and-search") {
|
||||
aEngine = this.currentEngine;
|
||||
source = "paste";
|
||||
}
|
||||
}
|
||||
|
||||
BrowserSearch.recordOneoffSearchInTelemetry(aEngine, source, type, where);
|
||||
@ -837,8 +842,7 @@
|
||||
label = this._stringBundle.getString("cmd_pasteAndSearch");
|
||||
element.setAttribute("label", label);
|
||||
element.setAttribute("anonid", "paste-and-search");
|
||||
element.setAttribute("oncommand",
|
||||
"BrowserSearch.searchBar.select(); goDoCommand('cmd_paste'); BrowserSearch.searchBar.handleSearchCommand();");
|
||||
element.setAttribute("oncommand", "BrowserSearch.pasteAndSearch(event)");
|
||||
cxmenu.insertBefore(element, insertLocation.nextSibling);
|
||||
pasteAndSearch = element;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user