4.52 KB, text/html
Updating QA Contact.
QA Contact: janc → lorca
Events that bubble but should not bubble The short answer is: all events bubble in Mozilla. There is one exception: the load event caused by image load does not bubble (this is per the spec). This means that the following events that should not bubble according to the specs do bubble in Mozilla, which is wrong: load (except when caused by image load) unload focus blur The above applies to content developers. XUL developers can generally rely on all events bubbling, but there are certain events coming from content that are prevented from entering XUL. These are: load (when caused by image load) (filtered completely) load (filtered in bubbling stage) unload (filtered in bubbling stage) focus (filtered in bubbling stage) blur (filtered in bubbling stage)
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
nsbeta1-, but we'd really want to have this for 1.0.
Component: Event Handling → DOM Events
Keywords: nsbeta1 → nsbeta1-
Target Milestone: Future → mozilla1.0
Bugs targeted at mozilla1.0 without the mozilla1.0 keyword moved to mozilla1.0.1 (you can query for this string to delete spam or retrieve the list of bugs I've moved)
Target Milestone: mozilla1.0 → mozilla1.0.1
I think I know how to fix this bug. Can someone give me a testcase? It looks like I have to add a event handler and these specific events and some prevent them from bubbling. How do I do that in JS?
Taking from joki
Assignee: joki → radha
We should also check what IE is doing and consider if we want to fix this or not based on that.
cc'ing vladimir (default QA contact)
Target Milestone: mozilla1.0.1 → Future
Assignee: radha → events
QA Contact: gerardok → ian
Target Milestone: Future → ---
So... what exactly is IE's behavior? That's the first step to going anywhere on this bug...
In my opinion, yes. That gives us an idea of what things may or may not break if we implement this precisely per spec. Then we decide whether to break them.
How does XBL anonymous content affect bubbling? I've yet to really receive a clear answer on that...
Good question.... Does an event that actually happened on some anonymous content get dispatched at target on the bound node? Or what?
As I recently encountered this bug, and no-one's actually followed-up with information on IE's behaviour, I thought I'd share a test case (all tests occurred on XP). This is what I can deduce from my observations. IE 6 (SP1) 1) No alert boxes displayed 2) "d4" and "d3" displayed 3) As expected When the document tree is modified by a listener, propagation stops at that node after all registered listeners fire. In the first phase of the test, the button modifies the document, so there is no bubbling at all. In the second phase, the listener on "d3" modifies the document, so "d2" doesn't receive the event. In the third phase, no modifications occur, so bubbling occurs all the way up to the document root. Mozilla 1.8a (Build 2004041608): 1) "d4", "d3", "d2", and "d1" displayed 2) As (1) 3) As expected As the event flow is not predetermined, the listeners are fired on all of the elements, meaning that all phases of the test occur on the first invokation. Opera 7.23 (Build 3227): 1) As expected 2) As expected 3) As expected This is the only browser I currently have working that behaves as planned. I hope that's useful in some way.
Michael, that testcase has nothing to do with this bug... This bug is not about the fact that event propagation doesn't use a snapshot of the DOM, which is what your testcase tests.
There is a tenuous link (events shouldn't bubble as shown in the test case) but in all, you're right: it's not what this bug is about, and I apologise. By the time I realised it myself - long after the submission - there was nothing to be done except expect a response like yours. By the way, I can't replicate this bug with v1.8. In fact, I can't attach a load listener to body using any of document.body.onload document.onload document.body.addEventListener() document.addEventListener() Only using window.onload, window.addEventListener(), or <body ... onload=""> functions with Mozilla. All of these are supported by Opera 7.23, and IE 6 supports document.body.onload.
Bulk priority change, per :mdaly
Priority: P3 → P5
You need to log in before you can comment on or make changes to this bug.