зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1264383 - makeFilteringListener breaks eventremoval with shims. r=mconley
This commit is contained in:
Родитель
33bbad3164
Коммит
3943237646
|
@ -587,10 +587,6 @@ EventTargetParent.init();
|
|||
var filteringListeners = new WeakMap();
|
||||
function makeFilteringListener(eventType, listener)
|
||||
{
|
||||
if (filteringListeners.has(listener)) {
|
||||
return filteringListeners.get(listener);
|
||||
}
|
||||
|
||||
// Some events are actually targeted at the <browser> element
|
||||
// itself, so we only handle the ones where know that won't happen.
|
||||
let eventTypes = ["mousedown", "mouseup", "click"];
|
||||
|
@ -598,6 +594,10 @@ function makeFilteringListener(eventType, listener)
|
|||
return listener;
|
||||
}
|
||||
|
||||
if (filteringListeners.has(listener)) {
|
||||
return filteringListeners.get(listener);
|
||||
}
|
||||
|
||||
function filter(event) {
|
||||
let target = event.originalTarget;
|
||||
if (target instanceof Ci.nsIDOMXULElement &&
|
||||
|
|
Загрузка…
Ссылка в новой задаче