Skip to content

Commit

Permalink
Don't always consume user activation for close watchers
Browse files Browse the repository at this point in the history
Closes #10046.
  • Loading branch information
domenic committed Jan 11, 2024
1 parent cdd014a commit 8460bf5
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -81653,31 +81653,31 @@ body { display:none }
null.</p></li>

<li>
<p>If <var>window</var> has <span>history-action activation</span>, then:</p>
<p>If there is no <span>close watcher</span> in <var>window</var>'s <span>close
watcher stack</span> whose <span data-x="close-watcher-user-activation">was created with user
activation</span> is false, then:</p>

<ol>
<li><p><span>Consume history-action user activation</span> given <var>window</var>.</p></li>

<li><p>Set <var>wasCreatedWithUserActivation</var> to true.</p></li>
<li><p>Set <var>wasCreatedWithUserActivation</var> to false.</p></li>

<li><p>Set <var>isGroupedWithPrevious</var> to false.</p></li>
</ol>

<p class="note">This will be the one "free" close watcher created without user activation, which
is useful for cases like session inactivity timeout dialogs or notifications from the
server.</p>
</li>

<li>
<p>Otherwise, if there is no <span>close watcher</span> in <var>window</var>'s <span>close
watcher stack</span> whose <span data-x="close-watcher-user-activation">was created with user
activation</span> is false, then:</p>
<p>Otherwise, if <var>window</var> has <span>history-action activation</span>, then:</p>

<ol>
<li><p>Set <var>wasCreatedWithUserActivation</var> to false.</p></li>
<li><p><span>Consume history-action user activation</span> given <var>window</var>.</p></li>

<li><p>Set <var>wasCreatedWithUserActivation</var> to true.</p></li>

<li><p>Set <var>isGroupedWithPrevious</var> to false.</p></li>
</ol>

<p class="note">This will be the one "free" close watcher created without user activation, which
is useful for cases like session inactivity timeout dialogs or notifications from the
server.</p>
</li>

<li>
Expand Down

0 comments on commit 8460bf5

Please sign in to comment.