Skip to content

Commit

Permalink
Do not establish close watchers in non-fully active documents
Browse files Browse the repository at this point in the history
Closes whatwg#10634. See whatwg#10659 for a better followup.
  • Loading branch information
domenic authored and dizhang168 committed Oct 28, 2024
1 parent c8ea697 commit ad69aa1
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -61658,8 +61658,9 @@ interface <dfn interface>HTMLDialogElement</dfn> : <span>HTMLElement</span> {
to the top layer</span> given <span>this</span>.</p></li>

<li id="canceling-dialogs">
<p>Set <span>this</span>'s <span data-x="dialog-close-watcher">close watcher</span> to the
result of <span data-x="establish a close watcher">establishing a close watcher</span> given
<p>If <span>this</span>'s <span>node document</span> is <span>fully active</span>, then set
<span>this</span>'s <span data-x="dialog-close-watcher">close watcher</span> to the result of
<span data-x="establish a close watcher">establishing a close watcher</span> given
<span>this</span>'s <span>relevant global object</span>, with:</p>

<ul>
Expand All @@ -61673,6 +61674,10 @@ interface <dfn interface>HTMLDialogElement</dfn> : <span>HTMLElement</span> {
<li><p><i data-x="create-close-watcher-closeAction">closeAction</i> being to <span>close the
dialog</span> given <span>this</span> and null.</p></li>
</ul>

<p class="XXX">It would be better if this method failed early for the non-<span>fully
active</span> case. That is being tracked in <a
href="https://github.com/whatwg/html/issues/10659">issue #10659</a>.</p>
</li>

<li><p>Set <span>this</span>'s <span>previously focused element</span> to the
Expand Down Expand Up @@ -85536,9 +85541,10 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
</li>

<li id="canceling-popovers">
<p>Set <var>element</var>'s <span>popover close watcher</span> to the result of <span
data-x="establish a close watcher">establishing a close watcher</span> given
<var>element</var>'s <span>relevant global object</span>, with:</p>
<p>If <var>document</var> is <span>fully active</span>, then set <var>element</var>'s
<span>popover close watcher</span> to the result of <span data-x="establish a close
watcher">establishing a close watcher</span> given <var>element</var>'s <span>relevant global
object</span>, with:</p>

<ul>
<li><p><i data-x="create-close-watcher-cancelAction">cancelAction</i> being to return
Expand All @@ -85548,6 +85554,10 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
data-x="hide popover algorithm">hide a popover</span> given <var>element</var>, true, true,
and false.</p></li>
</ul>

<p class="XXX">It would be better if this algorithm failed early for the non-<span>fully
active</span> case. That is being tracked in <a
href="https://github.com/whatwg/html/issues/10659">issue #10659</a>.</p>
</li>
</ol>
</li>
Expand Down

0 comments on commit ad69aa1

Please sign in to comment.