- From: poot <cvsmail@w3.org>
- Date: Fri, 30 Jul 2010 06:56:56 +0900 (JST)
- To: public-html-diffs@w3.org
hixie: Change autofocus='' to only focus the first control seen with the attribute (per document). (whatwg r5222) http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.4156&r2=1.4157&f=h http://html5.org/tools/web-apps-tracker?from=5221&to=5222 =================================================================== RCS file: /sources/public/html5/spec/Overview.html,v retrieving revision 1.4156 retrieving revision 1.4157 diff -u -d -r1.4156 -r1.4157 --- Overview.html 29 Jul 2010 00:34:13 -0000 1.4156 +++ Overview.html 29 Jul 2010 21:53:41 -0000 1.4157 @@ -33672,31 +33672,40 @@ describe how the user interacts with the control.</p> </div><h5 id="autofocusing-a-form-control"><span class="secno">4.10.19.4 </span>Autofocusing a form control</h5><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i></p><!-- 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>The <code title="attr-fe-autofocus"><a href="#attr-fe-autofocus">autofocus</a></code> attribute is a <a href="#boolean-attribute">boolean attribute</a>.<p>There must not be more than one element in the document with the <code title="attr-fe-autofocus"><a href="#attr-fe-autofocus">autofocus</a></code> attribute specified.<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>
Received on Thursday, 29 July 2010 21:54:32 UTC