8000 Fix modal check in dialog closing algorithm by josepharhar · Pull Request #9391 · whatwg/html · GitHub
[go: up one dir, main page]

Skip to content
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
Next Next commit
Fix modal check in dialog closing algorithm
The value for is modal needs to be cached. This was pointed out here:
#9178 (comment)
  • Loading branch information
josepharhar committed Jun 6, 2023
commit aebd2cf282dfa37a41aee332a871b3c651432900
9 changes: 6 additions & 3 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -60289,6 +60289,9 @@ interface <dfn interface>HTMLDialogElement</dfn> : <span>HTMLElement</span> {
<li><p>Remove <var>subject</var>'s <code data-x="attr-dialog-open">open</code>
attribute.</p></li>

<li><p>Let <var>wasModal</var> be the value of <var>subject</var>'s <span>is
modal</span>.</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 @@ -60308,9 +60311,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