mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 16:25:38 +00:00
Bug 1515307 - Opening the popup with up/down when a string is typed should search that string. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D16861 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
b8133e942b
commit
52355e3080
@ -348,13 +348,10 @@ class UrlbarInput {
|
||||
/**
|
||||
* Starts a query based on the user input.
|
||||
*
|
||||
* @param {string} [options.searchString]
|
||||
* The string the user entered in autocomplete.
|
||||
* @param {number} [options.lastKey]
|
||||
* The last key the user entered (as a key code).
|
||||
*/
|
||||
startQuery({
|
||||
searchString = "",
|
||||
lastKey = null,
|
||||
} = {}) {
|
||||
this.controller.startQuery(new QueryContext({
|
||||
@ -364,7 +361,7 @@ class UrlbarInput {
|
||||
maxResults: UrlbarPrefs.get("maxRichResults"),
|
||||
muxer: "UnifiedComplete",
|
||||
providers: ["UnifiedComplete"],
|
||||
searchString,
|
||||
searchString: this.textValue,
|
||||
}));
|
||||
}
|
||||
|
||||
@ -665,8 +662,8 @@ class UrlbarInput {
|
||||
}
|
||||
}
|
||||
|
||||
_on_input(event) {
|
||||
let value = event.target.value;
|
||||
_on_input() {
|
||||
let value = this.textValue;
|
||||
this.valueIsTyped = true;
|
||||
this._untrimmedValue = value;
|
||||
this.window.gBrowser.userTypedValue = value;
|
||||
@ -679,7 +676,6 @@ class UrlbarInput {
|
||||
|
||||
// XXX Fill in lastKey, and add anything else we need.
|
||||
this.startQuery({
|
||||
searchString: value,
|
||||
lastKey: null,
|
||||
});
|
||||
}
|
||||
|
@ -99,10 +99,9 @@ add_task(async function setup() {
|
||||
});
|
||||
|
||||
add_task(function test_input_starts_query() {
|
||||
input.inputField.value = "search";
|
||||
input.handleEvent({
|
||||
target: {
|
||||
value: "search",
|
||||
},
|
||||
target: input.inputField,
|
||||
type: "input",
|
||||
});
|
||||
|
||||
@ -122,10 +121,9 @@ add_task(function test_input_with_private_browsing() {
|
||||
// will use the updated return value of the private browsing stub.
|
||||
let privateInput = new UrlbarInput(inputOptions);
|
||||
|
||||
privateInput.inputField.value = "search";
|
||||
privateInput.handleEvent({
|
||||
target: {
|
||||
value: "search",
|
||||
},
|
||||
target: privateInput.inputField,
|
||||
type: "input",
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user