[html5] r5222 - [giow] (1) Change autofocus='' to only focus the first control seen with the att [...]

whatwg at whatwg.org whatwg at whatwg.org
Thu Jul 29 14:53:36 PDT 2010


Author: ianh
Date: 2010-07-29 14:53:34 -0700 (Thu, 29 Jul 2010)
New Revision: 5222

Modified:
   complete.html
   index
   source
Log:
[giow] (1) Change autofocus='' to only focus the first control seen with the attribute (per document).

Modified: complete.html
===================================================================
--- complete.html	2010-07-29 00:34:06 UTC (rev 5221)
+++ complete.html	2010-07-29 21:53:34 UTC (rev 5222)
@@ -44617,7 +44617,7 @@
   <!-- v2: Apply this to contentEditable elements -->
 
   <p>The <dfn id=attr-fe-autofocus title=attr-fe-autofocus><code>autofocus</code></dfn>
-  content attribute allows the user to indicate that a control is to
+  content attribute allows the author to indicate that a control is to
   be focused as soon as the page is loaded, allowing the user to just
   start typing without having to manually focus the main control.</p>
 
@@ -44630,24 +44630,33 @@
 
   <div class=impl>
 
-  <p>Whenever an element with the <code title=attr-fe-autofocus><a href=#attr-fe-autofocus>autofocus</a></code> attribute specified is
+  <p>When an element with the <code title=attr-fe-autofocus><a href=#attr-fe-autofocus>autofocus</a></code> attribute specified is
   <a href=#insert-an-element-into-a-document title="insert an element into a document">inserted into a
-  document</a> whose <a href=#browsing-context>browsing context</a> did not have the
-  <a href=#sandboxed-automatic-features-browsing-context-flag>sandboxed automatic features browsing context flag</a> set
-  when the <code><a href=#document>Document</a></code> was created, the user agent should
-  <a href=#queue-a-task>queue a task</a> that checks to see if the element is
-  <a href=#focusable>focusable</a>, and if so, runs the <a href=#focusing-steps>focusing
-  steps</a> for that element. User agents may also change the
-  scrolling position of the document, or perform some other action
-  that brings the element to the user's attention. The <a href=#task-source>task
-  source</a> for this task is the <a href=#dom-manipulation-task-source>DOM manipulation task
-  source</a>.</p>
+  document</a>, user agents should run the following steps:</p>~
 
-  <p>User agents may ignore this attribute if the user has indicated
-  (for example, by starting to type in a form control) that he does
-  not wish focus to be changed.</p>
+  <ol><li><p>If the <code><a href=#document>Document</a></code>'s <a href=#browsing-context>browsing context</a>
+   had the <a href=#sandboxed-automatic-features-browsing-context-flag>sandboxed automatic features browsing context
+   flag</a> set when the <code><a href=#document>Document</a></code> was created, abort
+   these steps.</li>
 
-  <p class=note>Focusing the control does not imply that the user
+   <li><p>If the user agent has already reached the last step of this
+   list of steps in response to an element being <a href=#insert-an-element-into-a-document title="insert
+   an element into a document">inserted</a> into this
+   <code><a href=#document>Document</a></code>, abort these steps.</li>
+
+   <li><p>If the user has indicated (for example, by starting to type
+   in a form control) that he does not wish focus to be changed, then
+   optionally abort these steps.</li>
+
+   <li><p><a href=#queue-a-task>Queue a task</a> that checks to see if the element
+   is <a href=#focusable>focusable</a>, and if so, runs the <a href=#focusing-steps>focusing
+   steps</a> for that element. User agents may also change the
+   scrolling position of the document, or perform some other action
+   that brings the element to the user's attention. The <a href=#task-source>task
+   source</a> for this task is the <a href=#dom-manipulation-task-source>DOM manipulation task
+   source</a>.</li>
+
+  </ol><p class=note>Focusing the control does not imply that the user
   agent must focus the browser window if it has lost focus.</p>
 
   <p>The <dfn id=dom-fe-autofocus title=dom-fe-autofocus><code>autofocus</code></dfn>

Modified: index
===================================================================
--- index	2010-07-29 00:34:06 UTC (rev 5221)
+++ index	2010-07-29 21:53:34 UTC (rev 5222)
@@ -44544,7 +44544,7 @@
   <!-- v2: Apply this to contentEditable elements -->
 
   <p>The <dfn id=attr-fe-autofocus title=attr-fe-autofocus><code>autofocus</code></dfn>
-  content attribute allows the user to indicate that a control is to
+  content attribute allows the author to indicate that a control is to
   be focused as soon as the page is loaded, allowing the user to just
   start typing without having to manually focus the main control.</p>
 
@@ -44557,24 +44557,33 @@
 
   <div class=impl>
 
-  <p>Whenever an element with the <code title=attr-fe-autofocus><a href=#attr-fe-autofocus>autofocus</a></code> attribute specified is
+  <p>When an element with the <code title=attr-fe-autofocus><a href=#attr-fe-autofocus>autofocus</a></code> attribute specified is
   <a href=#insert-an-element-into-a-document title="insert an element into a document">inserted into a
-  document</a> whose <a href=#browsing-context>browsing context</a> did not have the
-  <a href=#sandboxed-automatic-features-browsing-context-flag>sandboxed automatic features browsing context flag</a> set
-  when the <code><a href=#document>Document</a></code> was created, the user agent should
-  <a href=#queue-a-task>queue a task</a> that checks to see if the element is
-  <a href=#focusable>focusable</a>, and if so, runs the <a href=#focusing-steps>focusing
-  steps</a> for that element. User agents may also change the
-  scrolling position of the document, or perform some other action
-  that brings the element to the user's attention. The <a href=#task-source>task
-  source</a> for this task is the <a href=#dom-manipulation-task-source>DOM manipulation task
-  source</a>.</p>
+  document</a>, user agents should run the following steps:</p>~
 
-  <p>User agents may ignore this attribute if the user has indicated
-  (for example, by starting to type in a form control) that he does
-  not wish focus to be changed.</p>
+  <ol><li><p>If the <code><a href=#document>Document</a></code>'s <a href=#browsing-context>browsing context</a>
+   had the <a href=#sandboxed-automatic-features-browsing-context-flag>sandboxed automatic features browsing context
+   flag</a> set when the <code><a href=#document>Document</a></code> was created, abort
+   these steps.</li>
 
-  <p class=note>Focusing the control does not imply that the user
+   <li><p>If the user agent has already reached the last step of this
+   list of steps in response to an element being <a href=#insert-an-element-into-a-document title="insert
+   an element into a document">inserted</a> into this
+   <code><a href=#document>Document</a></code>, abort these steps.</li>
+
+   <li><p>If the user has indicated (for example, by starting to type
+   in a form control) that he does not wish focus to be changed, then
+   optionally abort these steps.</li>
+
+   <li><p><a href=#queue-a-task>Queue a task</a> that checks to see if the element
+   is <a href=#focusable>focusable</a>, and if so, runs the <a href=#focusing-steps>focusing
+   steps</a> for that element. User agents may also change the
+   scrolling position of the document, or perform some other action
+   that brings the element to the user's attention. The <a href=#task-source>task
+   source</a> for this task is the <a href=#dom-manipulation-task-source>DOM manipulation task
+   source</a>.</li>
+
+  </ol><p class=note>Focusing the control does not imply that the user
   agent must focus the browser window if it has lost focus.</p>
 
   <p>The <dfn id=dom-fe-autofocus title=dom-fe-autofocus><code>autofocus</code></dfn>

Modified: source
===================================================================
--- source	2010-07-29 00:34:06 UTC (rev 5221)
+++ source	2010-07-29 21:53:34 UTC (rev 5222)
@@ -49956,7 +49956,7 @@
   <!-- v2: Apply this to contentEditable elements -->
 
   <p>The <dfn title="attr-fe-autofocus"><code>autofocus</code></dfn>
-  content attribute allows the user to indicate that a control is to
+  content attribute allows the author to indicate that a control is to
   be focused as soon as the page is loaded, allowing the user to just
   start typing without having to manually focus the main control.</p>
 
@@ -49969,24 +49969,37 @@
 
   <div class="impl">
 
-  <p>Whenever an element with the <code
+  <p>When an element with the <code
   title="attr-fe-autofocus">autofocus</code> attribute specified is
   <span title="insert an element into a document">inserted into a
-  document</span> whose <span>browsing context</span> did not have the
-  <span>sandboxed automatic features browsing context flag</span> set
-  when the <code>Document</code> was created, the user agent should
-  <span>queue a task</span> that checks to see if the element is
-  <span>focusable</span>, and if so, runs the <span>focusing
-  steps</span> for that element. User agents may also change the
-  scrolling position of the document, or perform some other action
-  that brings the element to the user's attention. The <span>task
-  source</span> for this task is the <span>DOM manipulation task
-  source</span>.</p>
+  document</span>, user agents should run the following steps:</p>~
 
-  <p>User agents may ignore this attribute if the user has indicated
-  (for example, by starting to type in a form control) that he does
-  not wish focus to be changed.</p>
+  <ol>
 
+   <li><p>If the <code>Document</code>'s <span>browsing context</span>
+   had the <span>sandboxed automatic features browsing context
+   flag</span> set when the <code>Document</code> was created, abort
+   these steps.</p></li>
+
+   <li><p>If the user agent has already reached the last step of this
+   list of steps in response to an element being <span title="insert
+   an element into a document">inserted</span> into this
+   <code>Document</code>, abort these steps.</p></li>
+
+   <li><p>If the user has indicated (for example, by starting to type
+   in a form control) that he does not wish focus to be changed, then
+   optionally abort these steps.</p></li>
+
+   <li><p><span>Queue a task</span> that checks to see if the element
+   is <span>focusable</span>, and if so, runs the <span>focusing
+   steps</span> for that element. User agents may also change the
+   scrolling position of the document, or perform some other action
+   that brings the element to the user's attention. The <span>task
+   source</span> for this task is the <span>DOM manipulation task
+   source</span>.</p></li>
+
+  </ol>
+
   <p class="note">Focusing the control does not imply that the user
   agent must focus the browser window if it has lost focus.</p>
 




More information about the Commit-Watchers mailing list