mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
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:
parent
ee46777322
commit
99ee4cbf44
@ -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;
|
||||
|
@ -62,10 +62,10 @@ function doTests() {
|
||||
textbox.value = "foo";
|
||||
is(icons.selectedPanel, clearIcon, "clear icon is displayed when setting a value");
|
||||
|
||||
textbox.reset();
|
||||
textbox.value = "";
|
||||
is(textbox.defaultValue, "", "defaultValue is empty");
|
||||
is(textbox.value, "", "reset method clears the textbox");
|
||||
is(icons.selectedPanel, searchIcon, "search icon is displayed after textbox.reset()");
|
||||
is(icons.selectedPanel, searchIcon, "search icon is displayed after clearing value");
|
||||
|
||||
textbox.value = "foo";
|
||||
gExpectedValue = "";
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user