From 9a5fd3fc1d583fbb604e5b61cd2669545d4f9f09 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Tue, 24 Oct 2023 02:46:07 -0700 Subject: [PATCH] Add invoketarget logic for popovers in button DefaultEventHandler This adds logic on how buttons with an invoketarget pointing to an element with `popover` should behave, based on the Invokers proposal. See explainer section here: https://open-ui.org/components/invokers.explainer/#defaults. See related spec PR here: https://github.com/whatwg/html/pull/9875 This introduces new behavior just within the HTML Form Control `DefaultEventHandler` function such that: - If an `invoketarget` points to an element with `popover` - If the `invokeaction` is `auto` or `togglePopover`, try to toggle the popover - If the `invokeaction` is `hidePopover`, try to hide the popover - If the `invokeaction` is `showPopover`, try to show the popover If the `invokeaction` is none of the above, then it will fall through the to `HandleInvokeInternal` which is passed the lowercased atom so element subclasses can handle their individual behaviors. Bug: 1494737 Change-Id: Id2ab6faf8782a0fe0ba5c9f05ff562fee640f8b0 --- ...etarget-on-popover-behavior.tentative.html | 193 ++++++++++++++++++ 1 file changed, 193 insertions(+) create mode 100644 html/semantics/invokers/invoketarget-on-popover-behavior.tentative.html diff --git a/html/semantics/invokers/invoketarget-on-popover-behavior.tentative.html b/html/semantics/invokers/invoketarget-on-popover-behavior.tentative.html new file mode 100644 index 000000000000000..9d9bbaee721edcc --- /dev/null +++ b/html/semantics/invokers/invoketarget-on-popover-behavior.tentative.html @@ -0,0 +1,193 @@ + + + + + + + + + + + +
+ +
+ + +