зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1036912 - Log selections of searchSuggestTable in newtab. r=mak
This commit is contained in:
Родитель
fe4298b751
Коммит
103aa81085
|
@ -33,13 +33,24 @@ let gSearch = {
|
|||
if (event) {
|
||||
event.preventDefault();
|
||||
}
|
||||
let searchStr = this._nodes.text.value;
|
||||
let searchText = this._nodes.text;
|
||||
let searchStr = searchText.value;
|
||||
if (this.currentEngineName && searchStr.length) {
|
||||
this._send("Search", {
|
||||
|
||||
let eventData = {
|
||||
engineName: this.currentEngineName,
|
||||
searchString: searchStr,
|
||||
whence: "newtab",
|
||||
});
|
||||
}
|
||||
|
||||
if (searchText.hasAttribute("selection-index")) {
|
||||
eventData.selection = {
|
||||
index: searchText.getAttribute("selection-index"),
|
||||
kind: searchText.getAttribute("selection-kind")
|
||||
};
|
||||
}
|
||||
|
||||
this._send("Search", eventData);
|
||||
}
|
||||
this._suggestionController.addInputValueToFormHistory();
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче