зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1599070 - Replace references to textbox.reset(). r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D54742 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
b7a0475f37
Коммит
6fc8878917
|
@ -377,7 +377,11 @@ var PlacesOrganizer = {
|
|||
// At this point, resetSearchBox is true, because the left pane selection
|
||||
// has changed; otherwise we would have returned earlier.
|
||||
|
||||
PlacesSearchBox.searchFilter.reset();
|
||||
let input = PlacesSearchBox.searchFilter;
|
||||
input.value = "";
|
||||
try {
|
||||
input.editor.transactionManager.clear();
|
||||
} catch (e) {}
|
||||
this._setSearchScopeForNode(node);
|
||||
this.updateDetailsPane();
|
||||
},
|
||||
|
|
|
@ -411,13 +411,14 @@ var Sanitizer = {
|
|||
)) {
|
||||
let currentDocument = currentWindow.document;
|
||||
|
||||
// searchBar.textbox may not exist due to the search bar binding
|
||||
// not having been constructed yet if the search bar is in the
|
||||
// overflow or menu panel. It won't have a value or edit history in
|
||||
// that case.
|
||||
// searchBar may not exist if it's in the customize mode.
|
||||
let searchBar = currentDocument.getElementById("searchbar");
|
||||
if (searchBar && searchBar.textbox) {
|
||||
searchBar.textbox.reset();
|
||||
if (searchBar) {
|
||||
let input = searchBar.textbox;
|
||||
input.value = "";
|
||||
try {
|
||||
input.editor.transactionManager.clear();
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
let tabBrowser = currentWindow.gBrowser;
|
||||
|
|
|
@ -201,16 +201,6 @@
|
|||
return this.inputField.disabled;
|
||||
}
|
||||
|
||||
reset() {
|
||||
this.value = this.defaultValue;
|
||||
// XXX: Is this still needed ?
|
||||
try {
|
||||
this.editor.transactionManager.clear();
|
||||
return true;
|
||||
} catch (e) {}
|
||||
return false;
|
||||
}
|
||||
|
||||
_fireCommand(me) {
|
||||
if (me._timer) {
|
||||
clearTimeout(me._timer);
|
||||
|
|
Загрузка…
Ссылка в новой задаче