Closed Bug 13309 Opened 25 years ago Closed 25 years ago

Mixing capturers and bubblers causes double-events.

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: mikepinkerton, Assigned: joki)

Details

In my drag code, i have dragOver be a capturer and dragExit be a bubbler. When these events are registered with AddEventListener, however, the event listener manager notices they are the implemented by the same listener and "or's" the flags together. Now, however, both capturer and bubbler bits are set so the listener will be triggered both on the way down and the way back up. From nsEventListenerManager::AddEventListener for (int i=0; i<(*listeners)->Count(); i++) { ls = (nsListenerStruct*)(*listeners)->ElementAt(i); if (ls->mListener == aListener) { ls->mFlags |= aFlags; //****** NOT GOOD =( ls->mSubType |= aSubType; found = PR_TRUE; break; } Basically, the listener manager is incorrectly optimizing to save space. When flags are different, it should not re-use the same event listener.
Status: NEW → ASSIGNED
Yeah, unfortunately I knew about this one too, but no one had run into it until lucky you.
Target Milestone: M14
Target Milestone: M14 → M16
Moving M16. Mixing the two is rarer than using either alone. Not required for beta.
Assignee: joki → hyatt
Status: ASSIGNED → NEW
Target Milestone: M16 → M14
Unacceptable. I'm taking this bug then.
Assignee: hyatt → joki
Punting back to joki, since he says he's close to fixing this.
should work okay now.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Marking verified last comments.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.