Skip to content

Commit

Permalink
[giow] (1) Fire 'input' events on <select> also.
Browse files Browse the repository at this point in the history
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=23449
Affected topics: HTML

git-svn-id: http://svn.whatwg.org/webapps@8368 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Dec 19, 2013
1 parent 04fcfc8 commit d8cb491
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 33 deletions.
23 changes: 12 additions & 11 deletions complete.html
Expand Up @@ -43747,7 +43747,7 @@ <h5 id=common-input-element-events><span class=secno>4.10.5.5 </span>Common even
feature), the user agent must <a href=#queue-a-task>queue a task</a> to first update the <a href=#concept-fe-value title=concept-fe-value>value</a> accordingly, then <a href=#fire-a-simple-event>fire a simple event</a> that
bubbles named <code title=event-input>input</code> at the <code><a href=#the-input-element>input</a></code> element, then
<a href=#fire-a-simple-event>fire a simple event</a> that bubbles named <code title=event-change>change</code> at
the <code><a href=#the-input-element>input</a></code> element.
the <code><a href=#the-input-element>input</a></code> element.</p>

<p class=note>These events are not fired in response to changes made to the values of form
controls by scripts. (This is to make it easier to update the values of form controls in response
Expand Down Expand Up @@ -44090,9 +44090,8 @@ <h4 id=the-select-element><span class=secno>4.10.7 </span>The <dfn><code>select<
through a click, or through unfocusing the element after changing its value, or through a <a href=#using-the-option-element-to-define-a-command title=option-command>menu command</a>, or through any other mechanism), and before the
relevant user interaction event <!-- interaction event spec point --> is queued (e.g. before the
<code title=event-click><a href=#event-click>click</a></code> event), the user agent must set the <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> of the picked <code><a href=#the-option-element>option</a></code> element
to true, set its <a href=#concept-option-dirtiness title=concept-option-dirtiness>dirtiness</a> to true, and then <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a> that bubbles named
<code title=event-change>change</code> at the <code><a href=#the-select-element>select</a></code> element, using the <a href=#user-interaction-task-source>user
interaction task source</a> as the task source.</p>
to true, set its <a href=#concept-option-dirtiness title=concept-option-dirtiness>dirtiness</a> to true, and then
<a href=#send-select-update-notifications>send <code>select</code> update notifications</a>.</p>

<p>If the <code title=attr-select-multiple><a href=#attr-select-multiple>multiple</a></code> attribute is absent, whenever an
<code><a href=#the-option-element>option</a></code> element in the <code><a href=#the-select-element>select</a></code> element's <a href=#concept-select-option-list title=concept-select-option-list>list of options</a> has its <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> set to true, and whenever an
Expand All @@ -44107,10 +44106,8 @@ <h4 id=the-select-element><span class=secno>4.10.7 </span>The <dfn><code>select<
request being conveyed to the user agent, and before the relevant user interaction event <!--
interaction event spec point --> is queued (e.g. before the <code title=event-click><a href=#event-click>click</a></code>
event), the user agent must set the <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a>
of that <code><a href=#the-option-element>option</a></code> element to false, set its <a href=#concept-option-dirtiness title=concept-option-dirtiness>dirtiness</a> to true, and then <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a
simple event</a> that bubbles named <code title=event-change>change</code> at the
<code><a href=#the-select-element>select</a></code> element, using the <a href=#user-interaction-task-source>user interaction task source</a> as the task
source.</p>
of that <code><a href=#the-option-element>option</a></code> element to false, set its <a href=#concept-option-dirtiness title=concept-option-dirtiness>dirtiness</a> to true, and then <a href=#send-select-update-notifications>send
<code>select</code> update notifications</a>.</p>

<p>If <a href=#nodes-are-inserted>nodes are inserted</a> or <a href=#nodes-are-removed>nodes are removed</a> causing the <a href=#concept-select-option-list title=concept-select-option-list>list of options</a> to gain or lose one or more
<code><a href=#the-option-element>option</a></code> elements, or if an <code><a href=#the-option-element>option</a></code> element in the <a href=#concept-select-option-list title=concept-select-option-list>list of options</a> <dfn id=ask-for-a-reset title="ask for a reset">asks for a
Expand All @@ -44128,9 +44125,13 @@ <h4 id=the-select-element><span class=secno>4.10.7 </span>The <dfn><code>select<
user to <dfn id=concept-select-toggle title=concept-select-toggle>toggle</dfn> the <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> of the <code><a href=#the-option-element>option</a></code> elements in its
<a href=#concept-select-option-list title=concept-select-option-list>list of options</a> that are themselves not <a href=#concept-option-disabled title=concept-option-disabled>disabled</a>. Upon such an element being <a href=#concept-select-toggle title=concept-select-toggle>toggled</a> (either through a click, or through a <a href=#using-the-option-element-to-define-a-command title=option-command>menu command</a>, or any other mechanism), and before the relevant user interaction event <!--
interaction event spec point --> is queued (e.g. before a related <code title=event-click><a href=#event-click>click</a></code> event), the <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> of the <code><a href=#the-option-element>option</a></code>
element must be changed (from true to false or false to true), the <a href=#concept-option-dirtiness title=concept-option-dirtiness>dirtiness</a> of the element must be set to true, and 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> that bubbles named <code title=event-change>change</code> at
the <code><a href=#the-select-element>select</a></code> element, using the <a href=#user-interaction-task-source>user interaction task source</a> as the task
element must be changed (from true to false or false to true), the <a href=#concept-option-dirtiness title=concept-option-dirtiness>dirtiness</a> of the element must be set to true, and the
user agent must <a href=#send-select-update-notifications>send <code>select</code> update notifications</a>.</p>

<p>When the user agent is to <dfn id=send-select-update-notifications>send <code>select</code> update notifications</dfn>, <a href=#queue-a-task>queue
a task</a> to first <a href=#fire-a-simple-event>fire a simple event</a> that bubbles named <code title=event-input>input</code> at the <code><a href=#the-select-element>select</a></code> element, and then <a href=#fire-a-simple-event>fire a simple
event</a> that bubbles named <code title=event-change>change</code> at the
<code><a href=#the-select-element>select</a></code> element, using the <a href=#user-interaction-task-source>user interaction task source</a> as the task
source.</p>

<!--CLEANUP-->
Expand Down
23 changes: 12 additions & 11 deletions index
Expand Up @@ -43747,7 +43747,7 @@ You cannot submit this form when the field is incorrect.</samp></pre>
feature), the user agent must <a href=#queue-a-task>queue a task</a> to first update the <a href=#concept-fe-value title=concept-fe-value>value</a> accordingly, then <a href=#fire-a-simple-event>fire a simple event</a> that
bubbles named <code title=event-input>input</code> at the <code><a href=#the-input-element>input</a></code> element, then
<a href=#fire-a-simple-event>fire a simple event</a> that bubbles named <code title=event-change>change</code> at
the <code><a href=#the-input-element>input</a></code> element.
the <code><a href=#the-input-element>input</a></code> element.</p>

<p class=note>These events are not fired in response to changes made to the values of form
controls by scripts. (This is to make it easier to update the values of form controls in response
Expand Down Expand Up @@ -44090,9 +44090,8 @@ You cannot submit this form when the field is incorrect.</samp></pre>
through a click, or through unfocusing the element after changing its value, or through a <a href=#using-the-option-element-to-define-a-command title=option-command>menu command</a>, or through any other mechanism), and before the
relevant user interaction event <!-- interaction event spec point --> is queued (e.g. before the
<code title=event-click><a href=#event-click>click</a></code> event), the user agent must set the <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> of the picked <code><a href=#the-option-element>option</a></code> element
to true, set its <a href=#concept-option-dirtiness title=concept-option-dirtiness>dirtiness</a> to true, and then <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a> that bubbles named
<code title=event-change>change</code> at the <code><a href=#the-select-element>select</a></code> element, using the <a href=#user-interaction-task-source>user
interaction task source</a> as the task source.</p>
to true, set its <a href=#concept-option-dirtiness title=concept-option-dirtiness>dirtiness</a> to true, and then
<a href=#send-select-update-notifications>send <code>select</code> update notifications</a>.</p>

<p>If the <code title=attr-select-multiple><a href=#attr-select-multiple>multiple</a></code> attribute is absent, whenever an
<code><a href=#the-option-element>option</a></code> element in the <code><a href=#the-select-element>select</a></code> element's <a href=#concept-select-option-list title=concept-select-option-list>list of options</a> has its <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> set to true, and whenever an
Expand All @@ -44107,10 +44106,8 @@ You cannot submit this form when the field is incorrect.</samp></pre>
request being conveyed to the user agent, and before the relevant user interaction event <!--
interaction event spec point --> is queued (e.g. before the <code title=event-click><a href=#event-click>click</a></code>
event), the user agent must set the <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a>
of that <code><a href=#the-option-element>option</a></code> element to false, set its <a href=#concept-option-dirtiness title=concept-option-dirtiness>dirtiness</a> to true, and then <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a
simple event</a> that bubbles named <code title=event-change>change</code> at the
<code><a href=#the-select-element>select</a></code> element, using the <a href=#user-interaction-task-source>user interaction task source</a> as the task
source.</p>
of that <code><a href=#the-option-element>option</a></code> element to false, set its <a href=#concept-option-dirtiness title=concept-option-dirtiness>dirtiness</a> to true, and then <a href=#send-select-update-notifications>send
<code>select</code> update notifications</a>.</p>

<p>If <a href=#nodes-are-inserted>nodes are inserted</a> or <a href=#nodes-are-removed>nodes are removed</a> causing the <a href=#concept-select-option-list title=concept-select-option-list>list of options</a> to gain or lose one or more
<code><a href=#the-option-element>option</a></code> elements, or if an <code><a href=#the-option-element>option</a></code> element in the <a href=#concept-select-option-list title=concept-select-option-list>list of options</a> <dfn id=ask-for-a-reset title="ask for a reset">asks for a
Expand All @@ -44128,9 +44125,13 @@ You cannot submit this form when the field is incorrect.</samp></pre>
user to <dfn id=concept-select-toggle title=concept-select-toggle>toggle</dfn> the <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> of the <code><a href=#the-option-element>option</a></code> elements in its
<a href=#concept-select-option-list title=concept-select-option-list>list of options</a> that are themselves not <a href=#concept-option-disabled title=concept-option-disabled>disabled</a>. Upon such an element being <a href=#concept-select-toggle title=concept-select-toggle>toggled</a> (either through a click, or through a <a href=#using-the-option-element-to-define-a-command title=option-command>menu command</a>, or any other mechanism), and before the relevant user interaction event <!--
interaction event spec point --> is queued (e.g. before a related <code title=event-click><a href=#event-click>click</a></code> event), the <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> of the <code><a href=#the-option-element>option</a></code>
element must be changed (from true to false or false to true), the <a href=#concept-option-dirtiness title=concept-option-dirtiness>dirtiness</a> of the element must be set to true, and 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> that bubbles named <code title=event-change>change</code> at
the <code><a href=#the-select-element>select</a></code> element, using the <a href=#user-interaction-task-source>user interaction task source</a> as the task
element must be changed (from true to false or false to true), the <a href=#concept-option-dirtiness title=concept-option-dirtiness>dirtiness</a> of the element must be set to true, and the
user agent must <a href=#send-select-update-notifications>send <code>select</code> update notifications</a>.</p>

<p>When the user agent is to <dfn id=send-select-update-notifications>send <code>select</code> update notifications</dfn>, <a href=#queue-a-task>queue
a task</a> to first <a href=#fire-a-simple-event>fire a simple event</a> that bubbles named <code title=event-input>input</code> at the <code><a href=#the-select-element>select</a></code> element, and then <a href=#fire-a-simple-event>fire a simple
event</a> that bubbles named <code title=event-change>change</code> at the
<code><a href=#the-select-element>select</a></code> element, using the <a href=#user-interaction-task-source>user interaction task source</a> as the task
source.</p>

<!--CLEANUP-->
Expand Down
26 changes: 15 additions & 11 deletions source
Expand Up @@ -47863,7 +47863,7 @@ You cannot submit this form when the field is incorrect.</samp></pre>
data-x="concept-fe-value">value</span> accordingly, then <span>fire a simple event</span> that
bubbles named <code data-x="event-input">input</code> at the <code>input</code> element, then
<span>fire a simple event</span> that bubbles named <code data-x="event-change">change</code> at
the <code>input</code> element.</li>
the <code>input</code> element.</p>

<p class="note">These events are not fired in response to changes made to the values of form
controls by scripts. (This is to make it easier to update the values of form controls in response
Expand Down Expand Up @@ -48271,9 +48271,8 @@ You cannot submit this form when the field is incorrect.</samp></pre>
relevant user interaction event <!-- interaction event spec point --> is queued (e.g. before the
<code data-x="event-click">click</code> event), the user agent must set the <span
data-x="concept-option-selectedness">selectedness</span> of the picked <code>option</code> element
to true, set its <span data-x="concept-option-dirtiness">dirtiness</span> to true, and then <span>queue a task</span> to <span>fire a simple event</span> that bubbles named
<code data-x="event-change">change</code> at the <code>select</code> element, using the <span>user
interaction task source</span> as the task source.</p>
to true, set its <span data-x="concept-option-dirtiness">dirtiness</span> to true, and then
<span>send <code>select</code> update notifications</span>.</p>

<p>If the <code data-x="attr-select-multiple">multiple</code> attribute is absent, whenever an
<code>option</code> element in the <code>select</code> element's <span
Expand All @@ -48293,10 +48292,9 @@ You cannot submit this form when the field is incorrect.</samp></pre>
request being conveyed to the user agent, and before the relevant user interaction event <!--
interaction event spec point --> is queued (e.g. before the <code data-x="event-click">click</code>
event), the user agent must set the <span data-x="concept-option-selectedness">selectedness</span>
of that <code>option</code> element to false, set its <span data-x="concept-option-dirtiness">dirtiness</span> to true, and then <span>queue a task</span> to <span>fire a
simple event</span> that bubbles named <code data-x="event-change">change</code> at the
<code>select</code> element, using the <span>user interaction task source</span> as the task
source.</p>
of that <code>option</code> element to false, set its <span
data-x="concept-option-dirtiness">dirtiness</span> to true, and then <span>send
<code>select</code> update notifications</span>.</p>

<p>If <span>nodes are inserted</span> or <span>nodes are removed</span> causing the <span
data-x="concept-select-option-list">list of options</span> to gain or lose one or more
Expand All @@ -48323,9 +48321,15 @@ You cannot submit this form when the field is incorrect.</samp></pre>
interaction event spec point --> is queued (e.g. before a related <code
data-x="event-click">click</code> event), the <span
data-x="concept-option-selectedness">selectedness</span> of the <code>option</code>
element must be changed (from true to false or false to true), the <span data-x="concept-option-dirtiness">dirtiness</span> of the element must be set to true, and the user agent must <span>queue a task</span> to
<span>fire a simple event</span> that bubbles named <code data-x="event-change">change</code> at
the <code>select</code> element, using the <span>user interaction task source</span> as the task
element must be changed (from true to false or false to true), the <span
data-x="concept-option-dirtiness">dirtiness</span> of the element must be set to true, and the
user agent must <span>send <code>select</code> update notifications</span>.</p>

<p>When the user agent is to <dfn>send <code>select</code> update notifications</dfn>, <span>queue
a task</span> to first <span>fire a simple event</span> that bubbles named <code
data-x="event-input">input</code> at the <code>select</code> element, and then <span>fire a simple
event</span> that bubbles named <code data-x="event-change">change</code> at the
<code>select</code> element, using the <span>user interaction task source</span> as the task
source.</p>

<!--CLEANUP-->
Expand Down

0 comments on commit d8cb491

Please sign in to comment.