Skip to content

Commit

Permalink
Fix modal check in dialog closing algorithm
Browse files Browse the repository at this point in the history
The value for is modal needs to be cached. This was pointed out here:
#9178 (comment).
  • Loading branch information
josepharhar authored Jun 7, 2023
1 parent f55cf4f commit d5dba01
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -60433,6 +60433,9 @@ interface <dfn interface>HTMLDialogElement</dfn> : <span>HTMLElement</span> {
<li><p>If the <span>is modal</span> flag of <var>subject</var> is true, then <span data-x="list
remove">remove</span> it from its <code>Document</code>'s <span>top layer</span>.</p></li>

<li><p>Let <var>wasModal</var> be the value of <var>subject</var>'s <span>is
modal</span> flag.</p></li>

<li><p>Set the <span>is modal</span> flag of <var>subject</var> to false.</p></li>

<li><p>If <var>result</var> is not null, then set the <code
Expand All @@ -60449,9 +60452,9 @@ interface <dfn interface>HTMLDialogElement</dfn> : <span>HTMLElement</span> {

<li><p>If <var>subject</var>'s <span>node document</span>'s <span>focused area of the
document</span>'s <span>DOM anchor</span> is a <span>shadow-including inclusive
descendant</span> of <var>element</var>, or <var>subject</var>'s <span>is modal</span> is true,
then run the <span>focusing steps</span> for <var>element</var>; the viewport should not be
scrolled by doing this step.</p></li>
descendant</span> of <var>element</var>, or <var>wasModal</var> is true, then run the
<span>focusing steps</span> for <var>element</var>; the viewport should not be scrolled by
doing this step.</p></li>
</ol>
</li>

Expand Down

0 comments on commit d5dba01

Please sign in to comment.