Short URL: http://html5.org/r/2213
| SVN | Bug | Comment | Time (UTC) |
|---|---|---|---|
| 2213 | WF2: Define input.value, especially for type=text; and related tweaks to make things read better. | 2008-09-18 03:18 |
Index: source =================================================================== --- source (revision 2212) +++ source (revision 2213) @@ -25129,7 +25129,11 @@ false the element is <dfn title="concept-input-immutable"><i>immutable</i></dfn>. Unless otherwise specified, an <code>input</code> element is always <i - title="concept-input-mutable">mutable</i>.</p> + title="concept-input-mutable">mutable</i>. When an + <code>input</code> element is <i + title="concept-input-immutable">immutable</i>, the user agent should + not allow the user to modify the <span + title="concept-fe-value">value</span>.</p> <p>When an <code>input</code> element is <span title="concept-fe-disabled">disabled</span>, it is <i @@ -25229,8 +25233,19 @@ <p>When an <code>input</code> element's <code title="attr-input-type">type</code> attribute is in the <span title="attr-input-type-text">Text</span> state, the element - represents a text edit control for a single line of plain text.</p> + represents a one line plain text edit control for the element's + <span title="concept-fe-value">value</span>.</p> + <p>If an <code>input</code> element whose <code + title="attr-input-type">type</code> attribute is in the <span + title="attr-input-type-text">Text</span> state is <i + title="concept-input-mutable">mutable</i>, its <span + title="concept-fe-value">value</span> should be editable by the + user. User agents must not allow users to insert U+000A LINE FEED + (LF) or U+000D CARRIAGE RETURN (CR) characters into the <span + title="concept-fe-value">value</span> of such <code>input</code> + elements.</p> + <p><strong>The <span title="attr-input-type-text">Text</span> state's <span>control initialization algorithm</span> is as follows:</strong> <span>Strip line breaks from the @@ -25246,15 +25261,10 @@ the <code title="attr-input-value">value</code> content attribute and <span>strip line breaks from the value</span>.</p> - <p>If an <code>input</code> element whose <code - title="attr-input-type">type</code> attribute is in the <span - title="attr-input-type-text">Text</span> state is <i - title="concept-input-mutable">mutable</i>, its <span - title="concept-fe-value">value</span> should be editable by the - user. User agents must not allow users to insert U+000A LINE FEED - (LF) or U+000D CARRIAGE RETURN (CR) characters into the <span - title="concept-fe-value">value</span> of such <code>input</code> - elements.</p> + <p><strong>The <span><code title="dom-input-value">value</code> + setter algorithm</span> is as follows:</strong> Set the <span + title="concept-fe-value">value</span> of the element to the new + value and <span>strip line breaks from the value</span>.</p> <p>When an <code>input</code> element's <code title="attr-input-type">type</code> attribute is in the <span @@ -25583,7 +25593,14 @@ <h6>Value manipulation</h6> - <p class="big-issue">... <dfn title="dom-input-value"><code>value</code></dfn></p> + <p>The <dfn title="dom-input-value"><code>value</code></dfn> DOM + attribute allows secripts to manipulate the <span + title="concept-input-value">value</span> of an <code>input</code> + element. On getting, it must return the current <span + title="concept-input-value">value</span> of the element. On setting, + it must run the <dfn><code title="dom-input-value">value</code> + setter algorithm</dfn> defined for the element's <code + title="attr-input-type">type</code> attribute's current state.</p> <hr>