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 #10634. See #10659 for a better followup.
  • Loading branch information
domenic committed Oct 10, 2024
1 parent 33cf828 commit 6075687
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 @@ -61649,8 +61649,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 @@ -61664,6 +61665,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 @@ -85392,9 +85397,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 @@ -85404,6 +85410,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 6075687

Please sign in to comment.