mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1264383 - makeFilteringListener breaks eventremoval with shims. r=mconley a=ritu
MozReview-Commit-ID: BaxTDqXmjfG
This commit is contained in:
parent
e69e2357aa
commit
eb34b49322
@ -582,10 +582,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"];
|
||||
@ -593,6 +589,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 &&
|
||||
|
Loading…
Reference in New Issue
Block a user