RESOLVED FIXED 263081
[popover] element within complex shadow DOM breaks light dismiss calculation
https://bugs.webkit.org/show_bug.cgi?id=263081
Summary [popover] element within complex shadow DOM breaks light dismiss calculation
Westbrook
Reported 2023-10-12 10:36:59 PDT
This issue is closely related to https://bugs.webkit.org/show_bug.cgi?id=259261 in that I would have expected the flattened tree calculation added there to have prevented this, but here again, we see the light dismiss calculation for a `[popover="auto"]` element going awry. As seen in https://codepen.io/Westbrook/pen/JjwVYmr Safari 17 and TP both overreach and close the root popover erroneously when opening the child popover. Steps: 1) Visit https://codepen.io/Westbrook/pen/JjwVYmr 2) Click the "Show" button. 3) See the "outer" [popover] element open at the center of the page. 4) Click the "Show" button within the initial [popover] element. 5) See the "outer" [popover] element closed due to the light dismiss calculation, preventing the "inner" [popover] element from becoming visible. If you run the same steps in Chrome, you'll see the "inner" [popover] open over the "outer" [popover] as expected.
Attachments
Karl Dubost
Comment 1 2023-10-15 19:12:13 PDT
Firefox Nightly Not working (after setting dom.element.popover.enabled to true in about:config) In Safari the second nested showPopover() fails silently. In chrome we can see it.
Westbrook
Comment 2 2023-10-16 05:26:09 PDT
It seems that the DSD flag was maybe removed from Firefox nightly, but that feature was only leveraged for simplicity, it wasn't part of the larger issue. This demo exemplifies the issue with imperative Shadow DOM: https://codepen.io/Westbrook/pen/jOXooPB?editors=1010
Radar WebKit Bug Importer
Comment 3 2023-10-19 10:37:19 PDT
Tim Nguyen (:ntim)
Comment 4 2023-10-19 13:42:56 PDT
Luke Warlow
Comment 5 2023-10-19 15:28:57 PDT
I'm happy to take a look at this. I've got a WPT that covers it so shouldn't take long.
Luke Warlow
Comment 6 2023-10-19 15:41:39 PDT
EWS
Comment 7 2023-10-20 15:11:52 PDT
Committed 269596@main (4ab4d8351529): <https://commits.webkit.org/269596@main> Reviewed commits have been landed. Closing PR #19314 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.