Closed Bug 1734040 Opened 3 years ago Closed 3 years ago

HTMLSelectElement's input and change events do not have composed true set

Categories

(Core :: DOM: Forms, defect)

Firefox 92
defect

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: emarquez, Assigned: emilio)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.61 Safari/537.36

Steps to reproduce:

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

I want to add an event listener to a custom element that listens to the input and change events of a <select> inside the shadow root. Steps to repro:

  1. Place a select with options inside a shadow root of a custom element
  2. set an input or a change event listener on the custom element
  3. between values on the custom element
  4. observe event listeners don't get called

Actual results:

Event listeners on the shadow root host do not get called because the input and change events are both composed: false

Expected results:

Event listeners on the shadow root host should get called and the input and change events both have composed: true

FWIW the <input> element has bubbles & composed both as true for the input event (not change).

Component: Untriaged → DOM: Events
Product: Firefox → Core
Component: DOM: Events → DOM: Forms
Blocks: shadowdom

This matches other browsers and input elements.

Assignee: nobody → emilio

Change events are not composed for inputs, nor in other browsers, and I think that's probably fine?

Flags: needinfo?(annevk)

Yeah, this was in fact discussed and I forgot about it: https://github.com/whatwg/html/issues/5453#issuecomment-885222243. Thanks for pointing that out!

Flags: needinfo?(annevk)
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a9f7ec48cde9
Select input event should be composed. r=edgar,annevk
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: