[html5] r2520 - [] (0) WF2: Fire 'input' for <textarea> too.

whatwg at whatwg.org whatwg at whatwg.org
Tue Dec 2 02:40:46 PST 2008


Author: ianh
Date: 2008-12-02 02:40:44 -0800 (Tue, 02 Dec 2008)
New Revision: 2520

Modified:
   index
   source
Log:
[] (0) WF2: Fire 'input' for <textarea> too.

Modified: index
===================================================================
--- index	2008-12-02 10:18:35 UTC (rev 2519)
+++ index	2008-12-02 10:40:44 UTC (rev 2520)
@@ -27159,6 +27159,7 @@
   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
@@ -27166,6 +27167,8 @@
   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>
@@ -27867,7 +27870,16 @@
   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

Modified: source
===================================================================
--- source	2008-12-02 10:18:35 UTC (rev 2519)
+++ source	2008-12-02 10:40:44 UTC (rev 2520)
@@ -30445,6 +30445,7 @@
   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
@@ -30453,6 +30454,8 @@
   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,
@@ -31330,7 +31333,18 @@
   <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




More information about the Commit-Watchers mailing list