[Pale-Moon] Issue #1870 - Add try/catch and console logging for failing autocomplete popup.

This commit is contained in:
Moonchild 2021-05-23 14:57:13 +00:00 • committed by roytam1
commit 4bcb79066b

View file

@ -188,10 +188,15 @@ this.AutoCompletePopup = {
closePopup() {
if (this.openedPopup) {
// Note that hidePopup() closes the popup immediately,
// so popuphiding or popuphidden events will be fired
// and handled during this call.
this.openedPopup.hidePopup();
try {
// Note that hidePopup() closes the popup immediately,
// so popuphiding or popuphidden events will be fired
// and handled during this call.
this.openedPopup.hidePopup();
} catch(e) {
Cu.reportError(e);
console.log("Debug: ", this.openedPopup);
}
}
AutoCompleteTreeView.clearResults();
},