Skip to content

Commit

Permalink
[] (0) WF2: Fire 'input' for <textarea> too.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@2520 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Dec 2, 2008
1 parent 3238e01 commit 90cd279
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
14 changes: 13 additions & 1 deletion index
Expand Up @@ -27159,13 +27159,16 @@ You cannot complete this form until the field is correct.</samp></pre>
queuing the task; for example, a user agent could wait for the user
to have not hit a key for 100ms, so as to only fire the event when
the user pauses, instead of continuously for each keystroke.</p>
<!-- same text is present in the <textarea> section -->

<p class=example>Examples of a user changing the element's <a href=#concept-fe-value title=concept-fe-value>value</a> would include the user typing
into a text field, pasting a new value into the field, or undoing an
edit in that field. Some user interactions do not cause changes to
the value, e.g. hitting the "delete" key in an empty text field, or
replacing some text in the field with text from the clipboard that
happens to be exactly the same text.</p>
<!-- XXX consider putting the above example in a section that
applies to "input" events for the <textarea> element too -->

<p>When the <dfn id=event-input-change title=event-input-change><code>change</code></dfn> event applies,
if the element does not have an <a href=#activation-behavior>activation behavior</a>
Expand Down Expand Up @@ -27867,7 +27870,16 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href=#htmleleme
specified.</p>

<p>When a <code><a href=#the-textarea-element>textarea</a></code> is <a href=#concept-textarea-mutable title=concept-textarea-mutable>mutable</a>, its <a href=#concept-textarea-raw-value title=concept-textarea-raw-value>raw value</a> should be
editable by the user.</p>
editable by the user. Any time the user causes the element's <a href=#concept-textarea-raw-value title=concept-textarea-raw-value>raw value</a> to change, the
user agent must <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
event</a> called <code title=event-input>input</code> at the
<code><a href=#the-textarea-element>textarea</a></code> element, then <a href=#broadcast-forminput-events>broadcast <code title=event-forminput>forminput</code> events</a> at the
<code><a href=#the-textarea-element>textarea</a></code> element's <a href=#form-owner>form owner</a>. User agents
may wait for a suitable break in the user's interaction before
queuing the task; for example, a user agent could wait for the user
to have not hit a key for 100ms, so as to only fire the event when
the user pauses, instead of continuously for each keystroke.</p>
<!-- same text is present in the <input> section -->

<p>A <code><a href=#the-textarea-element>textarea</a></code> element has a <dfn id=concept-textarea-dirty title=concept-textarea-dirty>dirty value flag</dfn>, which must be
initially set to false, and must be set to true whenever the user
Expand Down
16 changes: 15 additions & 1 deletion source
Expand Up @@ -30445,6 +30445,7 @@ You cannot complete this form until the field is correct.</samp></pre>
queuing the task; for example, a user agent could wait for the user
to have not hit a key for 100ms, so as to only fire the event when
the user pauses, instead of continuously for each keystroke.</p>
<!-- same text is present in the <textarea> section -->

<p class="example">Examples of a user changing the element's <span
title="concept-fe-value">value</span> would include the user typing
Expand All @@ -30453,6 +30454,8 @@ You cannot complete this form until the field is correct.</samp></pre>
the value, e.g. hitting the "delete" key in an empty text field, or
replacing some text in the field with text from the clipboard that
happens to be exactly the same text.</p>
<!-- XXX consider putting the above example in a section that
applies to "input" events for the <textarea> element too -->

<p>When the <dfn
title="event-input-change"><code>change</code></dfn> event applies,
Expand Down Expand Up @@ -31330,7 +31333,18 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
<p>When a <code>textarea</code> is <span
title="concept-textarea-mutable">mutable</span>, its <span
title="concept-textarea-raw-value">raw value</span> should be
editable by the user.</p>
editable by the user. Any time the user causes the element's <span
title="concept-textarea-raw-value">raw value</span> to change, the
user agent must <span>queue a task</span> to <span>fire a simple
event</span> called <code title="event-input">input</code> at the
<code>textarea</code> element, then <span>broadcast <code
title="event-forminput">forminput</code> events</span> at the
<code>textarea</code> element's <span>form owner</span>. User agents
may wait for a suitable break in the user's interaction before
queuing the task; for example, a user agent could wait for the user
to have not hit a key for 100ms, so as to only fire the event when
the user pauses, instead of continuously for each keystroke.</p>
<!-- same text is present in the <input> section -->

<p>A <code>textarea</code> element has a <dfn
title="concept-textarea-dirty">dirty value flag</dfn>, which must be
Expand Down

0 comments on commit 90cd279

Please sign in to comment.