Bug 218290

Summary: Using ShadowRoot.delegatesFocus causes page to refresh
Product: WebKit Reporter: Caleb Williams <caleb.d.williams>
Component: DOMAssignee: 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   

Description Caleb Williams 2020-10-28 09:53:06 PDT
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
Comment 1 Caleb Williams 2020-10-28 10:15:02 PDT
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.
Comment 2 Smoley 2020-10-28 11:07:43 PDT
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?
Comment 3 Radar WebKit Bug Importer 2020-10-28 11:07:57 PDT
<rdar://problem/70771527>
Comment 4 Smoley 2020-10-28 11:28:07 PDT
Apple internal see rdar://66832677.
Comment 5 Smoley 2020-10-28 11:29:01 PDT

*** This bug has been marked as a duplicate of bug 215622 ***