Bug 259261

Summary: [popover] element within shadow DOM breaks light dismiss calculation
Product: WebKit Reporter: Westbrook <westbrook.johnson>
Component: DOMAssignee: Tim Nguyen (:ntim) <ntim>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, ntim, rniwa, webkit-bug-importer, zsun
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://github.com/web-platform-tests/wpt/pull/41251
Bug Depends on:    
Bug Blocks: 148695, 250171    

Westbrook
Reported 2023-07-16 06:18:11 PDT
When a [popover] element that is a descendant of an open [popover] element exists within a shadow DOM, the topmost clicked [popover] element (https://html.spec.whatwg.org/multipage/popover.html#topmost-clicked-popover) calculation is no done with the composed path which causes the descendant [popover] element to close the ancestor [popover] element at open time. You can repro this here: https://codepen.io/Westbrook/pen/BaGrdoq With the following code: <button popovertarget="popover" popovertargetaction="toggle">Toggle</button> <div id="popover" popover> <template shadowrootmode="open"> Outter <button popovertarget="popover-2" popovertargetaction="toggle">Toggle</button> <div id="popover-2" popover> Inner </div> </template> </div>
Attachments
Tim Nguyen (:ntim)
Comment 1 2023-07-16 15:06:17 PDT
Radar WebKit Bug Importer
Comment 2 2023-07-17 10:09:39 PDT
Tim Nguyen (:ntim)
Comment 3 2023-07-31 11:16:45 PDT
Tim Nguyen (:ntim)
Comment 4 2023-07-31 11:20:03 PDT
Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/41251
EWS
Comment 5 2023-07-31 13:05:27 PDT
Committed 266457@main (9336846dfe3b): <https://commits.webkit.org/266457@main> Reviewed commits have been landed. Closing PR #16234 and removing active labels.
zsun
Comment 6 2023-10-10 07:04:36 PDT
@ntim Tim, I noticed the result of the introduced test at https://wpt.fyi/results/html/semantics/popovers/popover-light-dismiss-flat-tree.html?label=master&label=experimental&aligned. Gecko has the same error report too (with popover enabled). Any idea?
Note You need to log in before you can comment on or make changes to this bug.