Bug 218290
| Summary: | Using ShadowRoot.delegatesFocus causes page to refresh | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Caleb Williams <caleb.d.williams> |
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | cdumez, smoley, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 14 | ||
| Hardware: | Mac | ||
| OS: | macOS 10.15 | ||
Caleb Williams
Attaching a shadow root with `delegatesFocus: true` will break a page of a click occurs inside the shadow DOM. A simple reproduction can be found a https://codepen.io/pen/MWeQaME
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Caleb Williams
Update: This seems to happen only when there is no to focusable child in the shadow root (including buttons due to how WebKit handles button focus). With something like an input in the shadow root, things work just fine.
Smoley
Thanks for filing, I can reproduce this on Safari 14.0 but I haven't been able to reproduce it on Safari 14.0.1 or 14.1. Are you able to reproduce this on later builds?
Radar WebKit Bug Importer
<rdar://problem/70771527>
Smoley
Apple internal see rdar://66832677.
Smoley
*** This bug has been marked as a duplicate of bug 215622 ***