Skip to content

Commit

Permalink
[giow] (2) Change how we define what happens when radio buttons are c…
Browse files Browse the repository at this point in the history
…licked but the event is canceled

Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=25254
Affected topics: HTML

git-svn-id: http://svn.whatwg.org/webapps@8704 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Aug 4, 2014
1 parent fd90b03 commit 9d97c46
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 28 deletions.
27 changes: 17 additions & 10 deletions complete.html
Expand Up @@ -35055,24 +35055,31 @@ <h6 id="radio-button-state-(type=radio)">4.10.5.1.17 <dfn>Radio Button</dfn> sta
whatever reason).<li>The element's <code id="radio-button-state-(type=radio):attr-fe-name-5"><a href=#attr-fe-name>name</a></code> attribute is set, changed, or
removed.<li>The element's <a href=#form-owner id="radio-button-state-(type=radio):form-owner-3">form owner</a> changes.<li><a href=#signal-a-type-change id="radio-button-state-(type=radio):signal-a-type-change">A type change is signalled</a> for the element.</ul>

<p>If the element is <i id="radio-button-state-(type=radio):concept-fe-mutable"><a href=#concept-fe-mutable>mutable</a></i>, then: The <a href=#pre-click-activation-steps id="radio-button-state-(type=radio):pre-click-activation-steps">pre-click
activation steps</a> consist of setting the element's <a href=#concept-fe-checked id="radio-button-state-(type=radio):concept-fe-checked-6">checkedness</a> to true. The <a href=#canceled-activation-steps id="radio-button-state-(type=radio):canceled-activation-steps">canceled activation steps</a>
consist of setting the element's <a href=#concept-fe-checked id="radio-button-state-(type=radio):concept-fe-checked-7">checkedness</a> to false.
The <a href=#activation-behavior id="radio-button-state-(type=radio):activation-behavior">activation behavior</a> is to <a href=#fire-a-simple-event id="radio-button-state-(type=radio):fire-a-simple-event">fire a simple event</a> that bubbles named
<code id="radio-button-state-(type=radio):event-input-input"><a href=#event-input-input>input</a></code> at the element and then <a href=#fire-a-simple-event id="radio-button-state-(type=radio):fire-a-simple-event-2">fire a simple
event</a> that bubbles named <code id="radio-button-state-(type=radio):event-input-change"><a href=#event-input-change>change</a></code> at the element.
.</p>
<p>If the element <var>R</var> is <i id="radio-button-state-(type=radio):concept-fe-mutable"><a href=#concept-fe-mutable>mutable</a></i>, then: The
<a href=#pre-click-activation-steps id="radio-button-state-(type=radio):pre-click-activation-steps">pre-click activation steps</a> for <var>R</var> consist of getting a reference to the
element in <var>R</var>'s <a href=#radio-button-group id="radio-button-state-(type=radio):radio-button-group-4">radio button group</a> that has its <a href=#concept-fe-checked id="radio-button-state-(type=radio):concept-fe-checked-6">checkedness</a> set to true, if any, and then setting
<var>R</var>'s <a href=#concept-fe-checked id="radio-button-state-(type=radio):concept-fe-checked-7">checkedness</a> to true. The <a href=#canceled-activation-steps id="radio-button-state-(type=radio):canceled-activation-steps">canceled
activation steps</a> for <var>R</var> consist of checking if the element to which a reference
was obtained in the <a href=#pre-click-activation-steps id="radio-button-state-(type=radio):pre-click-activation-steps-2">pre-click activation steps</a>, if any, is still in what is now
<var>R</var>'s <a href=#radio-button-group id="radio-button-state-(type=radio):radio-button-group-5">radio button group</a>, if it still has one, and if so, setting that
element's <a href=#concept-fe-checked id="radio-button-state-(type=radio):concept-fe-checked-8">checkedness</a> to true; or else, if there was no
such element, or that element is no longer in <var>R</var>'s <a href=#radio-button-group id="radio-button-state-(type=radio):radio-button-group-6">radio button group</a>, or
if <var>R</var> no longer has a <a href=#radio-button-group id="radio-button-state-(type=radio):radio-button-group-7">radio button group</a>, setting <var>R</var>'s <a href=#concept-fe-checked id="radio-button-state-(type=radio):concept-fe-checked-9">checkedness</a> to false. The <a href=#activation-behavior id="radio-button-state-(type=radio):activation-behavior">activation behavior</a> for
<var>R</var> is to <a href=#fire-a-simple-event id="radio-button-state-(type=radio):fire-a-simple-event">fire a simple event</a> that bubbles named <code id="radio-button-state-(type=radio):event-input-input"><a href=#event-input-input>input</a></code> at <var>R</var> and then <a href=#fire-a-simple-event id="radio-button-state-(type=radio):fire-a-simple-event-2">fire a simple event</a>
that bubbles named <code id="radio-button-state-(type=radio):event-input-change"><a href=#event-input-change>change</a></code> at <var>R</var>. </p>



<p>If the element is not <i id="radio-button-state-(type=radio):concept-fe-mutable-2"><a href=#concept-fe-mutable>mutable</a></i>, it has no <a href=#activation-behavior id="radio-button-state-(type=radio):activation-behavior-2">activation
behavior</a>.</p>

<p><strong>Constraint validation</strong>: If an element in the <i id="radio-button-state-(type=radio):radio-button-group-4"><a href=#radio-button-group>radio button group</a></i> is <i id="radio-button-state-(type=radio):concept-input-required"><a href=#concept-input-required>required</a></i>, and all of the <code id="radio-button-state-(type=radio):the-input-element-8"><a href=#the-input-element>input</a></code> elements in the
<i id="radio-button-state-(type=radio):radio-button-group-5"><a href=#radio-button-group>radio button group</a></i> have a <a href=#concept-fe-checked id="radio-button-state-(type=radio):concept-fe-checked-8">checkedness</a> that is
<p><strong>Constraint validation</strong>: If an element in the <i id="radio-button-state-(type=radio):radio-button-group-8"><a href=#radio-button-group>radio button group</a></i> is <i id="radio-button-state-(type=radio):concept-input-required"><a href=#concept-input-required>required</a></i>, and all of the <code id="radio-button-state-(type=radio):the-input-element-8"><a href=#the-input-element>input</a></code> elements in the
<i id="radio-button-state-(type=radio):radio-button-group-9"><a href=#radio-button-group>radio button group</a></i> have a <a href=#concept-fe-checked id="radio-button-state-(type=radio):concept-fe-checked-10">checkedness</a> that is
false, then the element is <a href=#suffering-from-being-missing id="radio-button-state-(type=radio):suffering-from-being-missing">suffering from being missing</a>.</p>



<p class=note>If none of the radio buttons in a <a href=#radio-button-group id="radio-button-state-(type=radio):radio-button-group-6">radio button group</a> are checked when
<p class=note>If none of the radio buttons in a <a href=#radio-button-group id="radio-button-state-(type=radio):radio-button-group-10">radio button group</a> are checked when
they are inserted into the document, then they will all be initially unchecked in the interface,
until such time as one of them is checked (either by the user or by script).</p>

Expand Down
27 changes: 17 additions & 10 deletions index
Expand Up @@ -35055,24 +35055,31 @@ ldh-str = &lt; as defined in <a href=http://tools.ietf.org/html/rfc1034#se
whatever reason).<li>The element's <code id="radio-button-state-(type=radio):attr-fe-name-5"><a href=#attr-fe-name>name</a></code> attribute is set, changed, or
removed.<li>The element's <a href=#form-owner id="radio-button-state-(type=radio):form-owner-3">form owner</a> changes.<li><a href=#signal-a-type-change id="radio-button-state-(type=radio):signal-a-type-change">A type change is signalled</a> for the element.</ul>

<p>If the element is <i id="radio-button-state-(type=radio):concept-fe-mutable"><a href=#concept-fe-mutable>mutable</a></i>, then: The <a href=#pre-click-activation-steps id="radio-button-state-(type=radio):pre-click-activation-steps">pre-click
activation steps</a> consist of setting the element's <a href=#concept-fe-checked id="radio-button-state-(type=radio):concept-fe-checked-6">checkedness</a> to true. The <a href=#canceled-activation-steps id="radio-button-state-(type=radio):canceled-activation-steps">canceled activation steps</a>
consist of setting the element's <a href=#concept-fe-checked id="radio-button-state-(type=radio):concept-fe-checked-7">checkedness</a> to false.
The <a href=#activation-behavior id="radio-button-state-(type=radio):activation-behavior">activation behavior</a> is to <a href=#fire-a-simple-event id="radio-button-state-(type=radio):fire-a-simple-event">fire a simple event</a> that bubbles named
<code id="radio-button-state-(type=radio):event-input-input"><a href=#event-input-input>input</a></code> at the element and then <a href=#fire-a-simple-event id="radio-button-state-(type=radio):fire-a-simple-event-2">fire a simple
event</a> that bubbles named <code id="radio-button-state-(type=radio):event-input-change"><a href=#event-input-change>change</a></code> at the element.
.</p>
<p>If the element <var>R</var> is <i id="radio-button-state-(type=radio):concept-fe-mutable"><a href=#concept-fe-mutable>mutable</a></i>, then: The
<a href=#pre-click-activation-steps id="radio-button-state-(type=radio):pre-click-activation-steps">pre-click activation steps</a> for <var>R</var> consist of getting a reference to the
element in <var>R</var>'s <a href=#radio-button-group id="radio-button-state-(type=radio):radio-button-group-4">radio button group</a> that has its <a href=#concept-fe-checked id="radio-button-state-(type=radio):concept-fe-checked-6">checkedness</a> set to true, if any, and then setting
<var>R</var>'s <a href=#concept-fe-checked id="radio-button-state-(type=radio):concept-fe-checked-7">checkedness</a> to true. The <a href=#canceled-activation-steps id="radio-button-state-(type=radio):canceled-activation-steps">canceled
activation steps</a> for <var>R</var> consist of checking if the element to which a reference
was obtained in the <a href=#pre-click-activation-steps id="radio-button-state-(type=radio):pre-click-activation-steps-2">pre-click activation steps</a>, if any, is still in what is now
<var>R</var>'s <a href=#radio-button-group id="radio-button-state-(type=radio):radio-button-group-5">radio button group</a>, if it still has one, and if so, setting that
element's <a href=#concept-fe-checked id="radio-button-state-(type=radio):concept-fe-checked-8">checkedness</a> to true; or else, if there was no
such element, or that element is no longer in <var>R</var>'s <a href=#radio-button-group id="radio-button-state-(type=radio):radio-button-group-6">radio button group</a>, or
if <var>R</var> no longer has a <a href=#radio-button-group id="radio-button-state-(type=radio):radio-button-group-7">radio button group</a>, setting <var>R</var>'s <a href=#concept-fe-checked id="radio-button-state-(type=radio):concept-fe-checked-9">checkedness</a> to false. The <a href=#activation-behavior id="radio-button-state-(type=radio):activation-behavior">activation behavior</a> for
<var>R</var> is to <a href=#fire-a-simple-event id="radio-button-state-(type=radio):fire-a-simple-event">fire a simple event</a> that bubbles named <code id="radio-button-state-(type=radio):event-input-input"><a href=#event-input-input>input</a></code> at <var>R</var> and then <a href=#fire-a-simple-event id="radio-button-state-(type=radio):fire-a-simple-event-2">fire a simple event</a>
that bubbles named <code id="radio-button-state-(type=radio):event-input-change"><a href=#event-input-change>change</a></code> at <var>R</var>. </p>



<p>If the element is not <i id="radio-button-state-(type=radio):concept-fe-mutable-2"><a href=#concept-fe-mutable>mutable</a></i>, it has no <a href=#activation-behavior id="radio-button-state-(type=radio):activation-behavior-2">activation
behavior</a>.</p>

<p><strong>Constraint validation</strong>: If an element in the <i id="radio-button-state-(type=radio):radio-button-group-4"><a href=#radio-button-group>radio button group</a></i> is <i id="radio-button-state-(type=radio):concept-input-required"><a href=#concept-input-required>required</a></i>, and all of the <code id="radio-button-state-(type=radio):the-input-element-8"><a href=#the-input-element>input</a></code> elements in the
<i id="radio-button-state-(type=radio):radio-button-group-5"><a href=#radio-button-group>radio button group</a></i> have a <a href=#concept-fe-checked id="radio-button-state-(type=radio):concept-fe-checked-8">checkedness</a> that is
<p><strong>Constraint validation</strong>: If an element in the <i id="radio-button-state-(type=radio):radio-button-group-8"><a href=#radio-button-group>radio button group</a></i> is <i id="radio-button-state-(type=radio):concept-input-required"><a href=#concept-input-required>required</a></i>, and all of the <code id="radio-button-state-(type=radio):the-input-element-8"><a href=#the-input-element>input</a></code> elements in the
<i id="radio-button-state-(type=radio):radio-button-group-9"><a href=#radio-button-group>radio button group</a></i> have a <a href=#concept-fe-checked id="radio-button-state-(type=radio):concept-fe-checked-10">checkedness</a> that is
false, then the element is <a href=#suffering-from-being-missing id="radio-button-state-(type=radio):suffering-from-being-missing">suffering from being missing</a>.</p>



<p class=note>If none of the radio buttons in a <a href=#radio-button-group id="radio-button-state-(type=radio):radio-button-group-6">radio button group</a> are checked when
<p class=note>If none of the radio buttons in a <a href=#radio-button-group id="radio-button-state-(type=radio):radio-button-group-10">radio button group</a> are checked when
they are inserted into the document, then they will all be initially unchecked in the interface,
until such time as one of them is checked (either by the user or by script).</p>

Expand Down
30 changes: 22 additions & 8 deletions source
Expand Up @@ -45303,14 +45303,28 @@ ldh-str = &lt; as defined in <a href="http://tools.ietf.org/html/rfc1034#s

</ul>

<p>If the element is <i data-x="concept-fe-mutable">mutable</i>, then: The <span>pre-click
activation steps</span> consist of setting the element's <span
data-x="concept-fe-checked">checkedness</span> to true. The <span>canceled activation steps</span>
consist of setting the element's <span data-x="concept-fe-checked">checkedness</span> to false.
The <span>activation behavior</span> is to <span>fire a simple event</span> that bubbles named
<code data-x="event-input-input">input</code> at the element and then <span>fire a simple
event</span> that bubbles named <code data-x="event-input-change">change</code> at the element.
<!-- It's not cancelable. Once this fires, the control is checked, end of story. -->.</p>
<p>If the element <var>R</var> is <i data-x="concept-fe-mutable">mutable</i>, then: The
<span>pre-click activation steps</span> for <var>R</var> consist of getting a reference to the
element in <var>R</var>'s <span>radio button group</span> that has its <span
data-x="concept-fe-checked">checkedness</span> set to true, if any, and then setting
<var>R</var>'s <span data-x="concept-fe-checked">checkedness</span> to true. The <span>canceled
activation steps</span> for <var>R</var> consist of checking if the element to which a reference
was obtained in the <span>pre-click activation steps</span>, if any, is still in what is now
<var>R</var>'s <span>radio button group</span>, if it still has one, and if so, setting that
element's <span data-x="concept-fe-checked">checkedness</span> to true; or else, if there was no
such element, or that element is no longer in <var>R</var>'s <span>radio button group</span>, or
if <var>R</var> no longer has a <span>radio button group</span>, setting <var>R</var>'s <span
data-x="concept-fe-checked">checkedness</span> to false. The <span>activation behavior</span> for
<var>R</var> is to <span>fire a simple event</span> that bubbles named <code
data-x="event-input-input">input</code> at <var>R</var> and then <span>fire a simple event</span>
that bubbles named <code data-x="event-input-change">change</code> at <var>R</var>. <!-- It's not
cancelable. Once this fires, the control is checked, end of story. --></p>

<!--
http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=3094
http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=3095
http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=3096
-->

<p>If the element is not <i data-x="concept-fe-mutable">mutable</i>, it has no <span>activation
behavior</span>.</p>
Expand Down

0 comments on commit 9d97c46

Please sign in to comment.