зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1500080 - UrlbarInput::value getter should return the untrimmed value. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D9088 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
7c665c8ac4
Коммит
87a039786e
|
@ -52,6 +52,7 @@ class UrlbarInput {
|
|||
this.valueIsTyped = false;
|
||||
this.userInitiatedFocus = false;
|
||||
this.isPrivate = PrivateBrowsingUtils.isWindowPrivate(this.window);
|
||||
this._untrimmedValue = "";
|
||||
|
||||
// Forward textbox methods and properties.
|
||||
const METHODS = ["addEventListener", "removeEventListener",
|
||||
|
@ -245,10 +246,12 @@ class UrlbarInput {
|
|||
}
|
||||
|
||||
get value() {
|
||||
return this.inputField.value;
|
||||
return this._untrimmedValue;
|
||||
}
|
||||
|
||||
set value(val) {
|
||||
this._untrimmedValue = val;
|
||||
|
||||
val = this.trimValue(val);
|
||||
|
||||
this.valueIsTyped = false;
|
||||
|
@ -427,11 +430,14 @@ class UrlbarInput {
|
|||
}
|
||||
|
||||
_on_input(event) {
|
||||
let value = event.target.value;
|
||||
this.valueIsTyped = true;
|
||||
this._untrimmedValue = value;
|
||||
this.window.gBrowser.userTypedValue = value;
|
||||
|
||||
// XXX Fill in lastKey, and add anything else we need.
|
||||
this.controller.startQuery(new QueryContext({
|
||||
searchString: event.target.value,
|
||||
searchString: value,
|
||||
lastKey: "",
|
||||
maxResults: UrlbarPrefs.get("maxRichResults"),
|
||||
isPrivate: this.isPrivate,
|
||||
|
|
Загрузка…
Ссылка в новой задаче