Input events should be instantiated with `{ composed: true }`
#1.201 geöffnet am 03.03.2022
Repository-Metriken
- Stars
- (188 Sterne)
- PR-Merge-Metriken
- (Keine gemergten PRs in 30 T)
Beschreibung
The composed property determines whether an event that occurs in shadow DOM will bubble to the host element.
In HTML, all form control input events are composed 1 2.
Presently, we are not instantiating input events with { composed: true }. See for example fillIn and select. I have not looked if there are other places. It probably makes sense to make this change in fireEvent itself similar to how bubbles is true by default.
Footnotes
-
Search for "Fire an event named input" on https://html.spec.whatwg.org/multipage/input.html and https://html.spec.whatwg.org/multipage/form-elements.html. ↩
-
Change events are not composed. ↩