Bug 1264383 - makeFilteringListener breaks eventremoval with shims. r=mconley

This commit is contained in:
Gabor Krizsanits 2016-04-18 10:40:26 +02:00
Родитель 33bbad3164
Коммит 3943237646
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -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 &&