Skip to content

Commit

Permalink
[giow] (1) Make <dialog> autofocus the first focusable control if the…
Browse files Browse the repository at this point in the history
…re isn't one with autofocus=''.

Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=23366
Affected topics: CSS, DOM APIs

git-svn-id: http://svn.whatwg.org/webapps@8338 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Dec 10, 2013
1 parent da4120d commit 78295fd
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 9 deletions.
17 changes: 14 additions & 3 deletions complete.html
Expand Up @@ -298,7 +298,7 @@

<header class=head id=head><p><a href=http://www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 9 December 2013</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 10 December 2013</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
Expand Down Expand Up @@ -51027,8 +51027,19 @@ <h4 id=the-dialog-element><span class=secno>4.11.7 </span>The <dfn><code>dialog<
<li><p>Push <var title="">subject</var> onto <var title="">subject</var>'s
<code><a href=#document>Document</a></code>'s <a href=#pending-dialog-stack>pending dialog stack</a>.</li>

<li><p>Let <var title="">control</var> be the first element in tree order whose nearest ancestor
<code><a href=#the-dialog-element>dialog</a></code> element is <var title="">subject</var> and that has an <code title=attr-fe-autofocus><a href=#attr-fe-autofocus>autofocus</a></code> attribute specified, if any.</li>
<li>

<p>Let <var title="">control</var> be the first element in tree order whose nearest ancestor
<code><a href=#the-dialog-element>dialog</a></code> element is <var title="">subject</var> and that has an <code title=attr-fe-autofocus><a href=#attr-fe-autofocus>autofocus</a></code> attribute specified, if any.</p>

<p>If there isn't one, then let <var title="">control</var> be the first element in tree order
whose nearest ancestor <code><a href=#the-dialog-element>dialog</a></code> element is <var title="">subject</var> and that is
<a href=#focusable>focusable</a>, if any.</p>

<p>If there isn't one of those either but <var title="">subject</var> itself is
<a href=#focusable>focusable</a>, then let <var title="">control</var> be <var title="">subject</var>. (This is unusual.)</p>

</li>

<li><p>If there is no <var title="">control</var>, then abort these steps.</li>

Expand Down
17 changes: 14 additions & 3 deletions index
Expand Up @@ -298,7 +298,7 @@

<header class=head id=head><p><a href=http://www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 9 December 2013</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 10 December 2013</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
Expand Down Expand Up @@ -51027,8 +51027,19 @@ dictionary <dfn id=relatedeventinit>RelatedEventInit</dfn> : <a href=#eventinit>
<li><p>Push <var title="">subject</var> onto <var title="">subject</var>'s
<code><a href=#document>Document</a></code>'s <a href=#pending-dialog-stack>pending dialog stack</a>.</li>

<li><p>Let <var title="">control</var> be the first element in tree order whose nearest ancestor
<code><a href=#the-dialog-element>dialog</a></code> element is <var title="">subject</var> and that has an <code title=attr-fe-autofocus><a href=#attr-fe-autofocus>autofocus</a></code> attribute specified, if any.</li>
<li>

<p>Let <var title="">control</var> be the first element in tree order whose nearest ancestor
<code><a href=#the-dialog-element>dialog</a></code> element is <var title="">subject</var> and that has an <code title=attr-fe-autofocus><a href=#attr-fe-autofocus>autofocus</a></code> attribute specified, if any.</p>

<p>If there isn't one, then let <var title="">control</var> be the first element in tree order
whose nearest ancestor <code><a href=#the-dialog-element>dialog</a></code> element is <var title="">subject</var> and that is
<a href=#focusable>focusable</a>, if any.</p>

<p>If there isn't one of those either but <var title="">subject</var> itself is
<a href=#focusable>focusable</a>, then let <var title="">control</var> be <var title="">subject</var>. (This is unusual.)</p>

</li>

<li><p>If there is no <var title="">control</var>, then abort these steps.</li>

Expand Down
18 changes: 15 additions & 3 deletions source
Expand Up @@ -56310,9 +56310,21 @@ dictionary <dfn>RelatedEventInit</dfn> : <span>EventInit</span> {
<li><p>Push <var data-x="">subject</var> onto <var data-x="">subject</var>'s
<code>Document</code>'s <span>pending dialog stack</span>.</p></li>

<li><p>Let <var data-x="">control</var> be the first element in tree order whose nearest ancestor
<code>dialog</code> element is <var data-x="">subject</var> and that has an <code
data-x="attr-fe-autofocus">autofocus</code> attribute specified, if any.</p></li>
<li>

<p>Let <var data-x="">control</var> be the first element in tree order whose nearest ancestor
<code>dialog</code> element is <var data-x="">subject</var> and that has an <code
data-x="attr-fe-autofocus">autofocus</code> attribute specified, if any.</p>

<p>If there isn't one, then let <var data-x="">control</var> be the first element in tree order
whose nearest ancestor <code>dialog</code> element is <var data-x="">subject</var> and that is
<span>focusable</span>, if any.</p>

<p>If there isn't one of those either but <var data-x="">subject</var> itself is
<span>focusable</span>, then let <var data-x="">control</var> be <var
data-x="">subject</var>. (This is unusual.)</p>

</li>

<li><p>If there is no <var data-x="">control</var>, then abort these steps.</p></li>

Expand Down

0 comments on commit 78295fd

Please sign in to comment.