<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>81564</bug_id>
          
          <creation_ts>2012-03-19 14:28:53 -0700</creation_ts>
          <short_desc>Events do not propagate in disconnected DOM trees</short_desc>
          <delta_ts>2022-10-23 12:23:42 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Erik Arvidsson">arv</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>adamk</cc>
    
    <cc>ahmad.saleem792</cc>
    
    <cc>annevk</cc>
    
    <cc>ap</cc>
    
    <cc>cdumez</cc>
    
    <cc>ddkilzer</cc>
    
    <cc>dglazkov</cc>
    
    <cc>jwalden+bwo</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>582251</commentid>
    <comment_count>0</comment_count>
    <who name="Erik Arvidsson">arv</who>
    <bug_when>2012-03-19 14:28:53 -0700</bug_when>
    <thetext>Given a disconnected DOM tree, we should still do the event propagation.

var parent = document.createElement(&apos;div&apos;);
var child = document.createElement(&apos;div&apos;);
parent.addEventListener(&apos;foo&apos;, function(e) { alert(e)}, true);
var event = document.createEvent(&apos;Event&apos;);
event.initEvent(&apos;foo&apos;, true, true);
parent.appendChild(child);
child.dispatchEvent(event)

Opera and FIrefox both alert here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>582276</commentid>
    <comment_count>1</comment_count>
    <who name="Adam Klein">adamk</who>
    <bug_when>2012-03-19 14:45:46 -0700</bug_when>
    <thetext>This seems to be due to the inDocument() check at the top of EventDispatcher::ensureEventAncestors:

http://trac.webkit.org/browser/trunk/Source/WebCore/dom/EventDispatcher.cpp#L235

It&apos;s been around a long time, dating back to when event dispatch was still in Node.cpp.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>582350</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2012-03-19 15:47:03 -0700</bug_when>
    <thetext>What does IE do? If IE and WebKit agree, it would take much more than just Firefox and Opera opinion to make this change necessary.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>837664</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2013-02-20 12:55:53 -0800</bug_when>
    <thetext>*** Bug 110353 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>864186</commentid>
    <comment_count>4</comment_count>
    <who name="Erik Arvidsson">arv</who>
    <bug_when>2013-03-26 19:31:25 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; What does IE do? If IE and WebKit agree, it would take much more than just Firefox and Opera opinion to make this change necessary.

IE passes the test in bug 110353. This makes WebKit the odd man out.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>864196</commentid>
    <comment_count>5</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2013-03-26 20:19:03 -0700</bug_when>
    <thetext>*** Bug 113336 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>872058</commentid>
    <comment_count>6</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2013-04-09 13:43:53 -0700</bug_when>
    <thetext>*** Bug 114023 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>872059</commentid>
    <comment_count>7</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2013-04-09 13:44:37 -0700</bug_when>
    <thetext>&lt;rdar://problem/13178101&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1502842</commentid>
    <comment_count>8</comment_count>
    <who name="Lucas Forschler">lforschler</who>
    <bug_when>2019-02-06 09:02:47 -0800</bug_when>
    <thetext>Mass moving XML DOM bugs to the &quot;DOM&quot; Component.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1907580</commentid>
    <comment_count>9</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-10-22 14:37:42 -0700</bug_when>
    <thetext>Chrome / Blink fixed this in following commit - https://src.chromium.org/viewvc/blink?view=revision&amp;revision=198153</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1907673</commentid>
    <comment_count>10</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2022-10-23 12:23:42 -0700</bug_when>
    <thetext>We must have fixed this at some point too, the test passes in Safari 16.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>