Bug 1502130 - Prevent handling contentSearchUI events if input element is no longer present r=ursula,k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D9828
This commit is contained in:
@@ -223,6 +223,11 @@ ContentSearchUIController.prototype = {
|
||||
},
|
||||
|
||||
handleEvent(event) {
|
||||
// The event handler is triggered by external events while the search
|
||||
// element may no longer be present
|
||||
if (!document.contains(this.input)) {
|
||||
return;
|
||||
}
|
||||
this["_on" + event.type[0].toUpperCase() + event.type.substr(1)](event);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user