Closed
Bug 66320
Opened 25 years ago
Closed 25 years ago
Listeners registered for the same IID twice doesn't release correctly
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Core
DOM: UI Events & Focus Handling
Tracking
()
RESOLVED
INVALID
People
(Reporter: mikepinkerton, Assigned: joki)
Details
If you register a listener twice for the same IID (say your object has code for
tooltips and/or context menus, both need to listen for mouse events, either or
both could be installed), the first time you unregister the listener for that
IID, the ELM releases the object. This could be bad ;)
| Reporter | ||
Comment 1•25 years ago
|
||
suggesting for moz0.8, but not holding my breath.
Keywords: mozilla0.8
Comment 2•25 years ago
|
||
Reassigning QA Contact for all open and unverified bugs previously under Lorca's
care to Gerardo as per phone conversation this morning.
QA Contact: lorca → gerardok
| Assignee | ||
Comment 3•25 years ago
|
||
Well I'm willing to listen to arguments about changing our internal registration
methods but they work as they do now so as to be in accordance with the
external public registration methods, written to spec, which says:
"If multiple identical EventListeners are registered on the same EventTarget
with the same parameters the duplicate instances are discarded. They do not
cause the EventListener to be called twice and since they are discarded they do
not need to be removed with the removeEventListener method."
I would suggest writing the code to work with the spec as written. Given that
I'm going to start with closing this invalid. Reopen if necessary if you can
give me a good argument for why we should write around this on the ELM side as
opposed to the registration side.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → INVALID
| Reporter | ||
Comment 4•25 years ago
|
||
ugh, well then that's just broken. since there is now no way to tell if it's
already registered, how do i know to take any precautions?
say I register mouseListener once for tooltips and again for context menus. then
tooltips get turned off dynamically, so I unregister the mouseListener. Now it's
unregistered for both!? That's just plain wrong. I guess i have to make separate
objects, and that just sucks sucks sucks.
Updated•25 years ago
|
Keywords: mozilla0.8
Updated•23 years ago
|
QA Contact: madhur → rakeshmishra
Updated•23 years ago
|
QA Contact: rakeshmishra → trix
Updated•7 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•