Add invoketarget logic for popovers in button DefaultEventHandler #42679
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: whatwg/html#9875
This introduces new behavior just within the HTML Form Control
DefaultEventHandler
function such that:invoketarget
points to an element withpopover
invokeaction
isauto
ortogglePopover
, try to togglethe popover
invokeaction
ishidePopover
, try to hide the popoverinvokeaction
isshowPopover
, try to show the popoverIf the
invokeaction
is none of the above, then it will fall throughthe to
HandleInvokeInternal
which is passed the lowercased atom soelement subclasses can handle their individual behaviors.
Bug: 1494737
Change-Id: Id2ab6faf8782a0fe0ba5c9f05ff562fee640f8b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4964940
Reviewed-by: Joey Arhar <[email protected]>
Reviewed-by: Mason Freed <[email protected]>
Commit-Queue: Luke <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1215820}