Intent to Ship: Popover nested inside invoker shouldn't re-invoke it

97 views
Skip to first unread message

Mason Freed

unread,
Nov 22, 2024, 1:28:10 PM11/22/24
to blink-dev

Contact emails

mas...@chromium.org

Explainer

None

Specification

https://github.com/whatwg/html/pull/10770

Summary

In this case: ``` <button popovertarget=foo>Activate <div popover id=foo>Clicking me shouldn't close me</div> </button> ``` clicking the button properly activates the popover, however, clicking on the popover itself after that should **not** close the popover. It currently does because the popover click bubbles to the `<button>` and activates the invoker, which toggles the popover closed. This chromestatus tracks changing the behavior so that clicking on the nested popover does not re-invoke itself. {Note: this likely should have been created as a "No developer-visible change" chromestatus entry, but it's too late now.}



Blink component

Blink>DOM

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility

The compat risk is exceedingly small: a site would need to use this corner case structure (popover nested inside its own invoker) *and* rely on the fact that clicking on that popover still triggers the invoker again. While possible, it seems very unlikely. (I will watch carefully for compat issues as I ship this, and will roll it back and reevaluate if any are found.)



Gecko: No signal

WebKit: Positive (https://github.com/whatwg/html/pull/10770) See comments on the spec PR.

Web developers: No signals

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None



Debuggability

None



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?

Yes

Is this feature fully tested by web-platform-tests?

Yes

https://wpt.fyi/results/html/semantics/popovers/popover-nested-in-button.tentative.html



Flag name on about://flags

PopoverButtonNestingBehavior

Finch feature name

PopoverButtonNestingBehavior

Requires code in //chrome?

False

Tracking bug

https://crbug.com/379241451

Estimated milestones

Shipping on desktop133
DevTrial on desktop133
Shipping on Android133
DevTrial on Android133
Shipping on WebView133


Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).

None

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/4821788884992000?gate=5371644422651904

This intent message was generated by Chrome Platform Status.

Vladimir Levin

unread,
Nov 22, 2024, 3:23:35 PM11/22/24
to Mason Freed, blink-dev
This seems like a small spec change to avoid an edge case. I suspect, as you also point out, that this should have been at most a PSA. Because of this, I don't think we need TAG, explainer, and other items that would've otherwise been required.

LGTM1

Thanks!
Vlad

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAM%3DNeDhaAXVwO2cpfv4vbOB%3Dwdtqov-xvKPjZDZRqOHQe13YKw%40mail.gmail.com.

Mike Taylor

unread,
Nov 22, 2024, 3:27:27 PM11/22/24
to Vladimir Levin, Mason Freed, blink-dev

Chris Harrelson

unread,
Nov 22, 2024, 3:46:01 PM11/22/24
to Mike Taylor, Vladimir Levin, Mason Freed, blink-dev

Mason Freed

unread,
Nov 22, 2024, 7:40:40 PM11/22/24
to Chris Harrelson, Mike Taylor, Vladimir Levin, blink-dev
Thank you all!
Reply all
Reply to author
Forward
0 new messages