Skip to content

Commit

Permalink
Spec change for focus without activation
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan-karamad committed May 1, 2019
1 parent eec5095 commit e74637e
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -4395,6 +4395,9 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<li>"<dfn data-x="document-domain-feature"><code data-x="">document-domain</code></dfn>", which
has a <span data-x="concept-default-allowlist">default allowlist</span> of <code
data-x="">*</code>.</li>
<li>"<dfn data-x="focus-without-user-activation-feature"><code
data-x="">focus-without-user-activation</code></dfn>", which has a <span
data-x="concept-default-allowlist">default allowlist</span> of <code data-x="">*</code>.</li>
</ul>


Expand Down Expand Up @@ -73243,13 +73246,24 @@ END:VCARD</pre>

<!-- focusin/focusout?: https://software.hixie.ch/utilities/js/live-dom-viewer/?saved=723 -->

<li><p>For If <var>new focus target</var> is a <span>browsing context</span>, let <var>new target
document</var> be the <span>browsing context</span>'s <span>active document</span>; otherwise let
<var>new target document</var> be the <span>node document</span> of the
<var>new focus target</var>.</p></li>

<li><p>Let <var>focus allowed</var> be true. If this algorithm is not
<span>triggered by user activation</span>, and
"<code data-x="focus-without-user-activation-feature">focus-without-user-activation</code>"
feature is disabled in <var>new target document</var>, let <var>focus allowed</var> be false.
</p></li>

<li><p>If the last entry in <var>old chain</var> and the last entry in <var>new chain</var> are the same, pop the last entry from <var>old chain</var>
and the last entry from <var>new chain</var> and redo this step.</p></li>

<li>

<p>For each entry <var>entry</var> in <var>old chain</var>, in order, run
these substeps:</p>
<p>If <var>focus allowed</var> is true, for each entry <var>entry</var> in <var>old chain</var>,
in order, run these substeps:</p>

<ol>

Expand Down Expand Up @@ -73297,9 +73311,9 @@ END:VCARD</pre>

</li>

<li><p>Apply any relevant platform-specific conventions for focusing <var>new focus
target</var>. (For example, some platforms select the contents of a text control when that
control is focused.)</p></li>
<li><p>If <var>focus allowed</var> is true, apply any relevant platform-specific conventions for
focusing <var>new focus target</var>. (For example, some platforms select the contents of a text
control when that control is focused.)</p></li>

<li>

Expand All @@ -73310,8 +73324,8 @@ END:VCARD</pre>

<li>

<p>If <var>entry</var> is a <span>focusable area</span>: designate <var>entry</var> as the
<span>focused area of the document</span>.</p>
<p>If <var>entry</var> is a <span>focusable area</span> and <var>focus allowed</var> is true:
designate <var>entry</var> as the <span>focused area of the document</span>.</p>

</li>

Expand Down Expand Up @@ -122555,6 +122569,7 @@ INSERT INTERFACES HERE
Edward Welbourne,
Edward Z. Yang,
Ehsan Akhgari,
Ehsan Karamad,
Eira Monstad,
Eitan Adler,
Eli Friedman,
Expand Down

0 comments on commit e74637e

Please sign in to comment.