WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
259261
[popover] element within shadow DOM breaks light dismiss calculation
https://bugs.webkit.org/show_bug.cgi?id=259261
Summary
[popover] element within shadow DOM breaks light dismiss calculation
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
Add attachment
proposed patch, testcase, etc.
Tim Nguyen (:ntim)
Comment 1
2023-07-16 15:06:17 PDT
https://searchfox.org/wubkat/rev/3ae98fa2c02b272e3e55c4e0c324d01da17cb5dc/Source/WebCore/dom/Document.cpp#8903
should probably iterate using `parentElementInComposedTree()`.
Radar WebKit Bug Importer
Comment 2
2023-07-17 10:09:39 PDT
<
rdar://problem/112410375
>
Tim Nguyen (:ntim)
Comment 3
2023-07-31 11:16:45 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/16234
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.
Top of Page
Format For Printing
XML
Clone This Bug