Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update how FocusChangeDisabled is set to true in case of change of focus #264

Open
wants to merge 3 commits into
base: gh-pages
Choose a base branch
from
Open
Changes from all commits
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
22 changes: 22 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,28 @@ <h2>
<li>
If <var>controller</var> is not <code>null</code>, run the following steps:
<ol>
<li>
<p>Let <var>toplevelTraversable</var> be the <a>current settings object</a>'s's [=relevant global object=]'s
[=navigable=]'s [=top-level traversable=].</p>
</li>
<li>
<p>Listen to <var>toplevelTraversable</var>'s change of <a data-cite="!HTML/#system-focus">system focus</a>.</p>
<p>The first time <var>toplevelTraversable</var> is losing <a data-cite="!HTML/#system-focus">focus</a>,
queue a global task on the <a data-cite="!HTML/#user-interaction-task-source">user interaction task source</a>
given <a>current settings object</a>'s [=relevant global object=] to run the following step:
<ol>
<li><p>Set <var>controller</var>.{{CaptureController/[[FocusChangeDisabled]]}} to <code>true</code>.</p></li>
</ol>
</p>
<p class="note">
These steps ensure {{CaptureController}} will not override explicit focus actions made by the user,
typically if a user decides to switch to another surface shortly after starting capture.
This algorithm describes what to do for surface pickers implemented by the <a>user agent</a> but the same
requirement applies to surface pickers implemented outside of the <a>user agent</a>,
where the loss of capturing document focus is not necessarily the signal triggering setting
{{CaptureController/[[FocusChangeDisabled]]}} to <code>true</code>.
</p>
</li>
<li>
<p>
Set <var>controller</var>.{{CaptureController/[[Source]]}}
Expand Down