<?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>122755</bug_id>
          
          <creation_ts>2013-10-14 08:48:59 -0700</creation_ts>
          <short_desc>DOM event does not bubble in off-DOM element</short_desc>
          <delta_ts>2022-09-29 18:03:27 -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>UI Events</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></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Paul Miller">paul+bugs</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>939460</commentid>
    <comment_count>0</comment_count>
    <who name="Paul Miller">paul+bugs</who>
    <bug_when>2013-10-14 08:48:59 -0700</bug_when>
    <thetext>DOM events don&apos;t bubble in off-DOM elements.

Here&apos;s the code:

```
var log = function(event) {console.log(&apos;Clicked on div&apos;, event);};

// Create DOM element.
var div = document.createElement(&apos;div&apos;);
// Don&apos;t append it to DOM. Though it works if we append it there.
// document.body.appendChild(div);
div.innerHTML = &apos;&lt;a id=&quot;outer&quot;&gt;&lt;span class=&quot;inner&quot;&gt;yo&lt;/span&gt;&lt;/a&gt;&apos;;

// Does not work.
div.addEventListener(&apos;click&apos;, log);
div.querySelector(&apos;#outer&apos;).click();
```

off-DOM event does not bubble up. Works fine in Firefox.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>939461</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Miller">paul+bugs</who>
    <bug_when>2013-10-14 08:53:27 -0700</bug_when>
    <thetext>Here&apos;s DOM events spec: http://www.w3.org/TR/DOM-Level-3-Events/#bubble-phase

Bubbling should end with defaultView. Or, in the off-DOM case it still should bubble.

&gt;Once determined, the propagation path must not be changed; for DOM implementations, this applies even if an element in the propagation path is moved within the DOM. or removed from the DOM.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1902207</commentid>
    <comment_count>2</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-09-29 15:36:02 -0700</bug_when>
    <thetext>Link - https://jsfiddle.net/rgtvmkx2/

** Chrome Canary 108 **

&quot;Clicked on div&quot;, [object PointerEvent] {

*** Safari 16 ***

&quot;Clicked on div&quot;, [object MouseEvent] {

*** Firefox Nightly 107 ***

&quot;Clicked on div&quot;, [object MouseEvent] {

_____

Anything else required? Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1902237</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2022-09-29 18:03:27 -0700</bug_when>
    <thetext>These results are a pass for this bug. Thank you for testing!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>