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:
Tim Nguyen 2019-11-27 16:07:25 +00:00
Родитель b7a0475f37
Коммит 6fc8878917
3 изменённых файлов: 12 добавлений и 17 удалений

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

@ -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);