Skip to content
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

Add "hide all popovers" algorithm #8886

Merged
merged 6 commits into from
Feb 23, 2023
Merged
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
27 changes: 16 additions & 11 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -59600,8 +59600,8 @@ interface <dfn interface>HTMLDialogElement</dfn> : <span>HTMLElement</span> {
and a boolean <var>isModal</var>, are as follows:</p>

<ol>
<li><p>Run <span data-x="hide-all-popovers-until">hide all popovers until</span> given null,
false, and false.</p></li>
<li><p>Run <span>hide all popovers</span> given <var>subject</var>'s <span>node
document</span>.</p></li>

<li><p>Let <var>control</var> be null.</p></li>

Expand Down Expand Up @@ -81438,7 +81438,8 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
ancestor</span> algorithm given <var>element</var>.</p></li>

<li><p>Run <span data-x="hide-all-popovers-until">hide all popovers until</span> given
<var>ancestor</var>, false, and false.</p></li>
<var>ancestor</var>'s <span>node document</span>, <var>ancestor</var>, false, and
false.</p></li>

<li>
<p>If <var>originalType</var> is not equal to the value of <var>element</var>'s <code
Expand Down Expand Up @@ -81564,8 +81565,8 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {

<ol>
<li><p>Run <span data-x="hide-all-popovers-until">hide all popovers until</span> given
<var>element</var>, <var>focusPreviousElement</var>, and
<var>dontFireEvents</var>.</p></li>
<var>element</var>'s <span>node document</span>, <var>element</var>,
<var>focusPreviousElement</var>, and <var>dontFireEvents</var>.</p></li>

<li>
<p>If <var>element</var> is not in <var>document</var>'s <span>auto popover list</span>:</p>
Expand Down Expand Up @@ -81655,13 +81656,12 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
given <span>this</span> and true.</p></li>
</ol>

<p>To <dfn data-x="hide-all-popovers-until">hide all popovers until</dfn>, given an <span
data-x="HTML elements">HTML element</span> <var>endpoint</var>, a boolean
<var>focusPreviousElement</var>, and a boolean <var>dontFireEvents</var>:</p>
<p>To <dfn data-x="hide-all-popovers-until">hide all popovers until</dfn>, given a
<code>Document</code> <var>document</var>, an <span data-x="HTML elements">HTML element</span> or
null <var>endpoint</var>, a boolean <var>focusPreviousElement</var>, and a boolean
<var>dontFireEvents</var>:</p>
annevk marked this conversation as resolved.
Show resolved Hide resolved

<ol>
<li><p>Let <var>document</var> be <var>endpoint</var>'s <span>node document</span>.</p></li>

<li>
<p>Let <var>closeAllOpenPopovers</var> be an algorithm which performs the following steps:</p>

Expand Down Expand Up @@ -81723,6 +81723,10 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
happens. For example, during light-dismiss of a popover, this algorithm ensures that we close only
the popovers that aren't related to the node clicked by the user.</p>

<p>To <dfn export>hide all popovers</dfn>, given a <code>Document</code> <var>document</var>, run
<span data-x="hide-all-popovers-until">hide all popovers until</span> given <var>document</var>,
null, false, and false.</p>

<p>To find the <dfn>topmost popover ancestor</dfn>, given a <code>Node</code>
<var>newPopover</var>, perform the following steps. They return an <span data-x="HTML
elements">HTML element</span> or null.</p>
Expand Down Expand Up @@ -82121,7 +82125,8 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
<li><p>Set <var>document</var>'s <span>popover pointerdown target</span> to null.</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 false.</p></li>
all popovers until</span> given <var>ancestor</var>'s <span>node document</span>,
<var>ancestor</var>, false, and false.</p></li>
</ol>
</li>
</ol>
Expand Down