зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1502130 - Prevent handling contentSearchUI events if input element is no longer present r=ursula,k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D9828 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
c9979fa9b6
Коммит
f2287575eb
|
@ -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);
|
||||
},
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче