<?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>231194</bug_id>
          
          <creation_ts>2021-10-04 15:30:16 -0700</creation_ts>
          <short_desc>HTMLSelectElement&apos;s change event does not have composed true set</short_desc>
          <delta_ts>2021-10-05 10:13:57 -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>New Bugs</component>
          <version>Safari 14</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</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>1</everconfirmed>
          <reporter name="Elliott Marquez">emarquez</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>akeerthi</cc>
    
    <cc>megan_gardner</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1800248</commentid>
    <comment_count>0</comment_count>
    <who name="Elliott Marquez">emarquez</who>
    <bug_when>2021-10-04 15:30:16 -0700</bug_when>
    <thetext>The `change` event on HTMLSelectElement has {bubbles: true, composed: false} unlike the `input` event which has `{bubbles: true, composed: true}` This means that if someone wants to listen for the change event from a &lt;select&gt; inside of the shadow root of a custom element, then it will not propagate through the composed shadow tree.

Live repro:
https://jsbin.com/zahocodiwo/edit?html,output

Steps to repro:

1. Place a &lt;select&gt; element with &lt;option&gt;s inside a shadow root
2. Add an event listener for the `change` event on the shadow root host
3. toggle between options in the &lt;select&gt;
4. observe that the `change` event listener is not called.

Expected behavior:

the event listener is called and the change event has `composed: true`

Actual behavior:

The event listener is not called and the change event has `composed: false`</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1800620</commentid>
    <comment_count>1</comment_count>
    <who name="Aditya Keerthi">akeerthi</who>
    <bug_when>2021-10-05 10:13:57 -0700</bug_when>
    <thetext>The WHATWG concluded that the `change` event should not be composed. [1]

Our behavior matches Chrome and Firefox.

[1] https://github.com/whatwg/html/issues/5453#issuecomment-885222243</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>