Skip to content

Commit

Permalink
Editorial: change "show popover" to call "check popover validity" first
Browse files Browse the repository at this point in the history
This is what implementations (at least Gecko and Chromium) do and it's analogous to what happens in "hide popover".

Fixes #9429.
  • Loading branch information
mbrodesser-Igalia committed Jun 29, 2023
1 parent be5c890 commit 66e162f
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -82554,12 +82554,23 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
element</span> or null <var>invoker</var>:</p>

<ol>
<li><p>If the result of running <span>check popover validity</span> given <var>element</var>,
false, <var>throwExceptions</var>, and null is false, then return.</p></li>

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

<li><p><span>Assert</span>: <var>element</var>'s <span>popover invoker</span> is null.</p></li>

<li><p>Set <var>element</var>'s <span>popover invoker</span> to <var>invoker</var>.</p></li>

<li><p><span>Assert</span>: <var>element</var> is not in <var>document</var>'s <span>top
layer</span>.</p></li>

<li><p>Let <var>nestedShow</var> be <var>element</var>'s <span>popover showing or
hiding</span>.</p></li>

<li><p>Set <var>element</var>'s <span>popover showing or hiding</span> to true.</p></li>

<li>
<p>Let <var>cleanupShowingFlag</var> be the following steps:</p>

Expand All @@ -82569,20 +82580,6 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
</ol>
</li>

<li><p>If the result of running <span>check popover validity</span> given <var>element</var>,
false, <var>throwExceptions</var>, and null is false, then run <var>cleanupShowingFlag</var> and
return.</p></li>

<li><p><span>Assert</span>: <var>element</var> is not in <var>document</var>'s <span>top
layer</span>.</p></li>

<li><p>Let <var>nestedShow</var> be false.</p></li>

<li><p>If <var>element</var>'s <span>popover showing or hiding</span> is true, then set
<var>nestedShow</var> to true.</p></li>

<li><p>Set <var>element</var>'s <span>popover showing or hiding</span> to true.</p></li>

<li><p>If the result of <span data-x="concept-event-fire">firing an event</span> named <code
data-x="event-beforetoggle">beforetoggle</code>, using <code>ToggleEvent</code>, with the <code
data-x="dom-Event-cancelable">cancelable</code> attribute initialized to true, the <code
Expand Down

0 comments on commit 66e162f

Please sign in to comment.