Bug 1520668 - Make UnifiedComplete set the default index before adding search @alias autofill matches. r=mak

Differential Revision: https://phabricator.services.mozilla.com/D16767

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Drew Willcoxon 2019-01-17 13:24:51 +00:00
Родитель 53c6c30ee4
Коммит 804709c386
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -1202,6 +1202,7 @@ Search.prototype = {
// that to the moz-action URL.
let aliasPreservingUserCase = token + alias.substr(token.length);
let value = aliasPreservingUserCase + " ";
this._result.setDefaultIndex(0);
this._addMatch({
value,
finalCompleteValue: PlacesUtils.mozActionURI("searchengine", {
@ -1215,7 +1216,6 @@ Search.prototype = {
style: "autofill action searchengine",
icon: engine.iconURI ? engine.iconURI.spec : null,
});
this._result.setDefaultIndex(0);
// Set _searchEngineAliasMatch with an empty query so that we don't
// attempt to add any more matches. When a token alias is autofilled,