Closed
Bug 242091
Opened 21 years ago
Closed 20 years ago
DOM-2 Event phases do not work properly
Categories
(Core :: DOM: Events, defect)
Tracking
()
RESOLVED
EXPIRED
People
(Reporter: doering, Unassigned)
References
()
Details
Attachments
(1 file)
10.99 KB,
text/html
|
Details |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7b) Gecko/20040421
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7b) Gecko/20040421
Elements with event-handlers for the CAPTURING_PHASE (addEventListener(...,true)
are SKIPPED during the BUBBLING_PHASE. eventPhase during CAPTURING_PHASE is set
to AT_TARGET for ALL elements along the way.
Reproducible: Always
Steps to Reproduce:
Load the above page an click on any element3.
Actual Results:
See above description
Expected Results:
Should invoke the event-handlers of ALL elements when BUBBLING up; eventPhase
during CAPTURING_PHASE should not be set to AT_TARGET
Reporter | ||
Updated•21 years ago
|
![]() |
||
Comment 1•21 years ago
|
||
> Elements with event-handlers for the CAPTURING_PHASE
> (addEventListener(...,true) are SKIPPED during the BUBBLING_PHASE
That's correct, per DOM spec. Those handlers should only fire during the
capturing phase... or are you adding handlers for both phases to the same
element? I can't tell because your testcase is so ridiculously huge; a 5-6 line
testcase should suffice to test this part.
> set to AT_TARGET for ALL elements along the way.
This is already filed.
Depends on: 234455
Whiteboard: DUPEME
Comment 2•21 years ago
|
||
I tested both addEventListener(...,true) and addEventListener(...,false) and
DOM-2 event was successufully fired in both target phase and bubble
phase(2004042808-trunk/Win-2K).
However, on second event(probably bubble phase) of target element, eventPhase
property of event object was "2"(target phase) instead of "3"(bubble phase).
Is it correct?
(Test case)
<div onClick> <p onClick> <span onClick="alert("xxx");"> ... </span> </p> </div>
When I clicked <span>, events are scheduled in next sequence.
(1) Target phase of <DIV>
(2) Target phase of <P>
(3) onClick of <SPAN>
(4) Target phase by addEventListener(...,true) for <SPAN>(=target object)
(5) Bubble phase? by addEventListener(...,false) for <SPAN>(=target object)
(6) onClick of <P>
(7) Bubble phase of <P>
(8) onClick of <DIV>
(9) Bubble phase of <DIV>
At step (1) & (2) & step(4), Event-Object.eventPhase was "2"(Target phase) as
expected.
At step (5) Event-Object.eventPhase was "2"(Target phase) in stead of "3"(Bubble
phase).
At step(7) & (9), Event-Object.eventPhase was "3"(Bubble phase) as expected.
Comment 3•21 years ago
|
||
[Case-1] is <div-1> <div-2> <div-3> </div> </div> </div> case.
Load this HTML and click inner most "div-3".
Updated•21 years ago
|
Attachment #147346 -
Attachment mime type: text/plain → text/html
Comment 4•21 years ago
|
||
The phases during bubbling look fine to me.
Comment 5•21 years ago
|
||
I've opened Bug 242763 for issue of Comment #2.
Anyway, addEventListener(...,false) works well as designed.
Comment 6•20 years ago
|
||
This is an automated message, with ID "auto-resolve01".
This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.
While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.
If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.
The latest beta releases can be obtained from:
Firefox: http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey: http://www.mozilla.org/projects/seamonkey/
Comment 7•20 years ago
|
||
This bug has been automatically resolved after a period of inactivity (see above
comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → EXPIRED
You need to log in
before you can comment on or make changes to this bug.
Description
•