Bug 42137 - Non-bubbling DOM events are bubbling
Summary: Non-bubbling DOM events are bubbling
Status: REOPENED
Alias: None
Product: Batik - Now in Jira
Classification: Unclassified
Component: SVG DOM (show other bugs)
Version: 1.7
Hardware: PC Linux
: P2 major
Target Milestone: ---
Assignee: Batik Developer's Mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-16 15:05 UTC by Archie Cobbs
Modified: 2009-03-30 15:53 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Archie Cobbs 2007-04-16 15:05:17 UTC
The DOM specification for mutation events:
http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html#Events-eventgroupings-mutationevents

specifies that the DOMNodeRemovedFromDocument and DOMNodeInsertedIntoDocument
mutation events, unlike the others, should NOT bubble.

However, Batik is bubbling these events.

Example of an event I received in a test program:

event=org.apache.batik.dom.events.DOMMutationEvent@ff45de
target=org.apache.batik.dom.svg.SVGOMSVGElement@6210fb
currentTarget=org.apache.batik.dom.svg.SVGOMGElement@aa37a6 phase=3 bubbles=true
type=DOMNodeRemovedFromDocument

Note that the "target" is different from the "currentTarget" and that
"bubbles=true". Both of these things should not happen for a non-bubbling event.
Comment 1 Cameron McCormack 2007-04-16 18:52:24 UTC
However, DOM Level 3 Events defines them to bubble:
http://www.w3.org/TR/DOM-Level-3-Events/events.html#event-DOMNodeRemovedFromDocument

Since the implementation is based on DOM 3 now, I think I'll leave it as bubbling.
Comment 2 Archie Cobbs 2007-04-17 07:19:38 UTC
Well I'll be darned. OK, nevermind then.
Comment 3 ash.logior 2009-03-30 06:30:09 UTC
(In reply to comment #1)
> However, DOM Level 3 Events defines them to bubble:
> http://www.w3.org/TR/DOM-Level-3-Events/events.html#event-DOMNodeRemovedFromDocument
> 
> Since the implementation is based on DOM 3 now, I think I'll leave it as bubbling.

There seems to be an inconsistency in the DOM 3 events spec; the table of event types in section 1.5.1

http://www.w3.org/TR/DOM-Level-3-Events/events.html#Events-EventTypes-complete

still lists DOMNodeRemovedFromDocument and DOMNodeInsertedIntoDocument as non-bubbling.
Comment 4 Bj 2009-03-30 06:47:03 UTC
I think http://lists.w3.org/Archives/Public/public-webapi/2008Jan/0012.html this is an error in the specification. The definition was not meant to be changed from DOM Level 2, as far as I recall anyway.
Comment 5 Cameron McCormack 2009-03-30 15:53:43 UTC
OK, reopened.  DOM Level 3 Events is being worked on again now, and DOM mutation events are being reworked AIUI.  I'll leave this bug open until that reworking is done.