Skip to content
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
88 changes: 24 additions & 64 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -63063,9 +63063,6 @@ interface <dfn interface>HTMLDialogElement</dfn> : <span>HTMLElement</span> {

<hr>

<p>Each <code>Document</code> has a <dfn>dialog pointerdown target</dfn>, which is an <span
data-x="HTMLDialogElement">HTML dialog element</span> or null, initially null.</p>

<p>Each <span data-x="html elements">HTML element</span> has a <dfn>previously focused
element</dfn> which is null or an element, and it is initially null. When <code
data-x="dom-dialog-showModal">showModal()</code> and <code data-x="dom-dialog-show">show()</code>
Expand Down Expand Up @@ -63528,7 +63525,8 @@ interface <dfn interface>HTMLDialogElement</dfn> : <span>HTMLElement</span> {
data-x="attr-dialog-closedby-any-state">Any</span> state will close the <code>dialog</code> element. This
is in addition to how such <code>dialog</code>s respond to <span data-x="close request">close requests</span>.</p>

<p>To <dfn>light dismiss open dialogs</dfn>, given a <code>PointerEvent</code> <var>event</var>:</p>
<p>To <dfn>light dismiss open dialogs</dfn>, given a <code data-x="event-click">click</code> event
<var>event</var>:</p>

<ol>
<li><p><span>Assert</span>: <var>event</var>'s <code
Expand All @@ -63543,42 +63541,24 @@ interface <dfn interface>HTMLDialogElement</dfn> : <span>HTMLElement</span> {
<li><p>Let <var>ancestor</var> be the result of running <span>nearest clicked dialog</span>
given <var>event</var>.</p></li>

<li><p>If <var>event</var>'s <code data-x="dom-Event-type">type</code> is
"<code data-x="event-pointerdown">pointerdown</code>", then set <var>document</var>'s
<span>dialog pointerdown target</span> to <var>ancestor</var>.</p></li>

<li>
<p>If <var>event</var>'s <code data-x="dom-Event-type">type</code> is
"<code data-x="event-pointerup">pointerup</code>", then:</p>

<ol>
<li><p>Let <var>sameTarget</var> be true if <var>ancestor</var> is <var>document</var>'s
<span>dialog pointerdown target</span>.</p></li>

<li><p>Set <var>document</var>'s <span>dialog pointerdown target</span> to null.</p></li>

<li><p>If <var>sameTarget</var> is false, then return.</p></li>

<li><p>Let <var>topmostDialog</var> be the last element of <var>document</var>'s <span>open
dialogs list</span>.</p></li>
<li><p>Let <var>topmostDialog</var> be the last element of <var>document</var>'s <span>open
dialogs list</span>.</p></li>

<li><p>If <var>ancestor</var> is <var>topmostDialog</var>, then return.</p></li>
<li><p>If <var>ancestor</var> is <var>topmostDialog</var>, then return.</p></li>

<li><p>If <var>topmostDialog</var>'s <span>computed closed-by state</span> is not <span
data-x="attr-dialog-closedby-any-state">Any</span>, then return.</p></li>
<li><p>If <var>topmostDialog</var>'s <span>computed closed-by state</span> is not <span
data-x="attr-dialog-closedby-any-state">Any</span>, then return.</p></li>

<li><p><span>Assert</span>: <var>topmostDialog</var>'s <span
data-x="dialog-close-watcher">close watcher</span> is not null.</p></li>
<li><p><span>Assert</span>: <var>topmostDialog</var>'s <span
data-x="dialog-close-watcher">close watcher</span> is not null.</p></li>

<li><p><span data-x="close-watcher-request-close">Request to close</span>
<var>topmostDialog</var>'s <span data-x="dialog-close-watcher">close watcher</span> with
false.</p></li>
</ol>
</li>
<li><p><span data-x="close-watcher-request-close">Request to close</span>
<var>topmostDialog</var>'s <span data-x="dialog-close-watcher">close watcher</span> with
false.</p></li>
</ol>

<p>To <dfn>run light dismiss activities</dfn>, given a <code>PointerEvent</code>
<var>event</var>:</p>
<p>To <dfn>run light dismiss activities</dfn>, given a <code data-x="event-click">click</code>
event <var>event</var>:</p>

<ol>
<li><p>Run <span>light dismiss open popovers</span> with <var>event</var>.</p></li>
Expand All @@ -63590,8 +63570,8 @@ interface <dfn interface>HTMLDialogElement</dfn> : <span>HTMLElement</span> {
href="https://github.com/w3c/pointerevents/pull/460">Pointer Events spec</a> when the user clicks
or touches anywhere on the page.</p>

<p>To find the <dfn>nearest clicked dialog</dfn>, given a <code>PointerEvent</code>
<var>event</var>:</p>
<p>To find the <dfn>nearest clicked dialog</dfn>, given a <code data-x="event-click">click</code>
event <var>event</var>:</p>

<ol>
<li><p>Let <var>target</var> be <var>event</var>'s <span
Expand Down Expand Up @@ -87382,9 +87362,6 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
data-x="popover-showing-state">showing</dfn></p></li>
</ul>

<p>Every <code>Document</code> has a <dfn>popover pointerdown target</dfn>, which is an <span
data-x="HTML elements">HTML element</span> or null, initially null.</p>

<p>Every <span data-x="HTML elements">HTML element</span> has a <dfn>popover invoker</dfn>, which
is an <span data-x="HTML elements">HTML element</span> or null, initially set to null.</p>

Expand Down Expand Up @@ -88550,8 +88527,8 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
data-x="attr-popover-auto-state">Auto</span> state will close the popover. This is in addition to
how such popovers respond to <span data-x="close request">close requests</span>.</p>

<p>To <dfn>light dismiss open popovers</dfn>, given a <code>PointerEvent</code>
<var>event</var>:</p>
<p>To <dfn>light dismiss open popovers</dfn>, given a <code data-x="event-click">click</code>
event <var>event</var>:</p>

<ol>
<li><p><span>Assert</span>: <var>event</var>'s <code
Expand All @@ -88567,31 +88544,14 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {

<li><p>If <var>topmostPopover</var> is null, then return.</p></li>

<li><p>If <var>event</var>'s <code data-x="dom-Event-type">type</code> is "<code
data-x="event-pointerdown">pointerdown</code>", then: set <var>document</var>'s <span>popover
pointerdown target</span> to the result of running <span>topmost clicked popover</span> given
<var>target</var>.</p></li>

<li>
<p>If <var>event</var>'s <code data-x="dom-Event-type">type</code> is "<code
data-x="event-pointerup">pointerup</code>", then:</p>

<ol>
<li><p>Let <var>ancestor</var> be the result of running <span>topmost clicked popover</span>
given <var>target</var>.</p></li>

<li><p>Let <var>sameTarget</var> be true if <var>ancestor</var> is <var>document</var>'s
<span>popover pointerdown target</span>.</p></li>
<li><p>Let <var>ancestor</var> be the result of running <span>topmost clicked popover</span>
given <var>target</var>.</p></li>

<li><p>Set <var>document</var>'s <span>popover pointerdown target</span> to null.</p></li>

<li><p>If <var>ancestor</var> is null, then set <var>ancestor</var> to
<var>document</var>.</p></li>
<li><p>If <var>ancestor</var> is null, then set <var>ancestor</var> to
<var>document</var>.</p></li>

<li><p>If <var>sameTarget</var> is true, then run <span data-x="hide-all-popovers-until">hide
all popovers until</span> given <var>ancestor</var>, false, and true.</p></li>
</ol>
</li>
<li><p>Run <span data-x="hide-all-popovers-until">hide all popovers until</span> given
<var>ancestor</var>, false, and true.</p></li>
</ol>

<p>To find the <dfn>topmost clicked popover</dfn>, given a <code>Node</code> <var>node</var>:</p>
Expand Down