Skip to content

Add popover light dismiss integration #460

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: gh-pages
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add popover light dismiss integration
I am adding a new HTML attribute called "popover" in
whatwg/html#8221

Part of this feature involves "light dismiss", where clicking outside of
an element with the popover attribute causes it to be closed. This
functionality was originally implemented by changing the event
dispatching system of the DOM, but it was recommended to move it here
instead:
whatwg/dom#1117 (comment)
https://chromium-review.googlesource.com/c/chromium/src/+/4023021
  • Loading branch information
josepharhar committed Nov 22, 2022
commit fd1817812e5f90a3f5462e2812951cfb5be81f19
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,8 @@ <h2>Firing events using the <code>PointerEvent</code> interface</h2>
<p>If the event is {{GlobalEventHandlers/pointerdown}}, the associated device is a direct manipulation device, and the target is an {{Element}},
then <a>set pointer capture</a> for this <code>pointerId</code> to the target element as described in <a>implicit pointer capture</a>.

<p>Run <a href="html.spec.whatwg.org/#popover-light-dismiss">light dismiss open popovers</a> given the event and target.</p>

<p>Fire the event to the determined target. The user agent SHOULD treat the target as if the pointing device has moved over it for the purpose of <a data-cite="uievents/#events-mouseevent-event-order">ensuring event ordering</a> [[UIEVENTS]].</p>

<div class="note">Using the <a>pointer capture target override</a> as the target instead of the normal hit-test result may fire some boundary events, as defined by [[UIEVENTS]]. This is the same as the pointer leaving its previous target and entering this new capturing target. When the capture is released, the same scenario may happen, as the pointer is leaving the capturing target and entering the hit-test target.</div>
Expand Down