Closed
Bug 261818
Opened 20 years ago
Closed 20 years ago
[FIXr]Mutation events not fired for the first node inserted into an XML document
Categories
(Core :: XML, defect, P1)
Core
XML
Tracking
()
RESOLVED
FIXED
mozilla1.8alpha5
People
(Reporter: jwkbugzilla, Assigned: bzbarsky)
Details
Attachments
(3 files)
14 bytes,
text/xml
|
Details | |
693 bytes,
text/html
|
Details | |
2.29 KB,
patch
|
bryner
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
Weird things happen with the event handlers when you modify an XML document that is loaded into the iframe. In particular, for the first node to be inserted into this document mutation events don't seem to bubble.
Reporter | ||
Comment 1•20 years ago
|
||
Reporter | ||
Comment 2•20 years ago
|
||
This attachment loads an empty XML document and inserts two XML nodes. An event listener is added to the document root to watch over attribute changes. For the attribute change in the second element the alert pops up correctly, for the first one it doesn't. However, if you add the listener directly to the node, the alert will appear - the event is there, it just doesn't bubble.
Assignee | ||
Comment 3•20 years ago
|
||
So... the problem here is that the first node that's inserted has an insertion parent, according to the binding manager. This happens because the prettyprint binding is in effect when the node is inserted. When the binding is dropped, for some reason things are not cleared properly. So the point is that the event captures up to the insertion parent, not the actual parent. The second node inserted into the document has a null insertion parent, so things capture up to the parent correctly. If I prevent prettyprinting from kicking in (eg by sticking an XHTML-namespaced node into the document), things work fine.
Assignee: events → hjtoi-bugzilla
Component: DOM: Events → XML
QA Contact: ian → ashshbhatt
Assignee | ||
Comment 4•20 years ago
|
||
Assignee | ||
Comment 5•20 years ago
|
||
Comment on attachment 160874 [details] [diff] [review] Make sure to clear the insertion parent entries properly The nsXBLService change is random cleanup I found while making sure that aOldDocument wouldn't be null in ChangeDocument.
Attachment #160874 -
Flags: superreview?(jst)
Attachment #160874 -
Flags: review?(bryner)
Comment 6•20 years ago
|
||
Comment on attachment 160874 [details] [diff] [review] Make sure to clear the insertion parent entries properly sr=jst
Attachment #160874 -
Flags: superreview?(jst) → superreview+
Updated•20 years ago
|
Attachment #160874 -
Flags: review?(bryner) → review+
Assignee | ||
Updated•20 years ago
|
Assignee: hjtoi-bugzilla → bzbarsky
Priority: -- → P1
Summary: Mutation events not fired for the first node inserted into an XML document → [FIXr]Mutation events not fired for the first node inserted into an XML document
Target Milestone: --- → mozilla1.8alpha5
Assignee | ||
Comment 7•20 years ago
|
||
Fixed.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•