зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1527724 - Let the preselected result not modify the urlbar value. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D19762 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
11e921c983
Коммит
b6a41eda70
|
@ -162,7 +162,7 @@ class UrlbarView {
|
|||
|
||||
if (queryContext.lastResultCount == 0) {
|
||||
if (queryContext.preselected) {
|
||||
this._selectItem(fragment.firstElementChild);
|
||||
this._selectItem(fragment.firstElementChild, false);
|
||||
} else {
|
||||
// Clear the selection when we get a new set of results.
|
||||
this._selectItem(null);
|
||||
|
@ -172,7 +172,7 @@ class UrlbarView {
|
|||
// TODO bug 1523602: the selection should stay on the node that had it, if
|
||||
// it's still in the current result set.
|
||||
let resultIndex = this._selected.getAttribute("resultIndex");
|
||||
this._selectItem(fragment.children[resultIndex]);
|
||||
this._selectItem(fragment.children[resultIndex], false);
|
||||
}
|
||||
|
||||
// TODO bug 1523602: For now, clear the results for each set received.
|
||||
|
|
|
@ -31,6 +31,10 @@ add_task(async function() {
|
|||
await PlacesUtils.history.clear();
|
||||
});
|
||||
|
||||
await promiseAutocompleteResultPopup("moz");
|
||||
Assert.equal(gURLBar.textValue, "moz",
|
||||
"Preselected search keyword result shouldn't automatically add a space");
|
||||
|
||||
await promiseAutocompleteResultPopup("moz open a search");
|
||||
let result = await UrlbarTestUtils.getDetailsOfResultAt(window, 0);
|
||||
if (UrlbarPrefs.get("quantumbar")) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче