Bug 218290 - Using ShadowRoot.delegatesFocus causes page to refresh
Summary: Using ShadowRoot.delegatesFocus causes page to refresh
Status: RESOLVED DUPLICATE of bug 215622
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: Safari 14
Hardware: Mac macOS 10.15
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-10-28 09:53 PDT by Caleb Williams
Modified: 2020-10-28 11:29 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***