Skip to content

Commit

Permalink
Add popover light dismiss integration
Browse files Browse the repository at this point in the history
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
1 parent 7276898 commit fd18178
Showing 1 changed file with 2 additions and 0 deletions.
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

0 comments on commit fd18178

Please sign in to comment.