The focusin event from open shadow DOM does not bubble to parent document
Categories
(Core :: DOM: Events, defect)
Tracking
()
People
(Reporter: lingfangao, Unassigned, NeedInfo)
Details
Attachments
(1 obsolete file)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0
Steps to reproduce:
Clone repo https://github.com/ling1726/shadow-dom-focusin-repro
Setup
- run npm install
- run npm run dev
- navigate to http://localhost:5173/
Steps
- click on a button
- output should be:
focusin listener - shadow root
focusin listener - document
click listener - shadow root
click listener - document
- click on another button
- output should be:
focusin listener - shadow root
click listener - shadow root
click listener - document
Actual results:
Each click event is received by the parent document of the open shadow root.
First focusin event is received by the parent document of the open shadow root - all subsequent focusin events are not bubbled up
Expected results:
Each click event is received by the parent document of the open shadow root.
Each focusin event is received by the parent document of the open shadow root
| Reporter | ||
Comment 1•2 years ago
|
||
Also adding here that according to MDN https://developer.mozilla.org/en-US/docs/Web/API/Event/composed
All UA-dispatched UI events are composed (click/touch/mouseover/copy/paste, etc.). Most other types of events are not composed, and so will return false. For example, this includes synthetic events that are created without their composed option set to true.
```
I understand the above to assume that `focusin` events that happen inside and open shadow root should bubble up to the parent document
Updated•2 years ago
|
Comment 2•2 years ago
|
||
Sean, Adam: Is this anything you'd know something about?
Comment 4•1 year ago
|
||
I just tested this with today's Nightly and the Nightly from 2023-12-15 and I see we produce the expected behaviour.
lingfangao, do you mind check this again and see if it still reproducible for you? Thanks
Updated•1 year ago
|
Description
•