<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>27333</bug_id>
          
          <creation_ts>2014-11-15 06:16:06 +0000</creation_ts>
          <short_desc>Most user agents (Chrome, Firefox) seem to distinguish between space and enter. Enter submits the form, even for radio buttons, space selects the checkbox.</short_desc>
          <delta_ts>2015-10-07 04:24:15 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>HISTORICAL - UI Events</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>MOVED</resolution>
          
          
          <bug_file_loc>https://html.spec.whatwg.org/#file-upload-state-(type=file)</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Travis Leithead [MSFT]">travil</assigned_to>
          <cc>garykac</cc>
    
    <cc>ian</cc>
    
    <cc>manishearth</cc>
    
    <cc>mike</cc>
    
    <cc>public-webapps</cc>
    
    <cc>www-dom</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>114962</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2014-11-15 06:16:06 +0000</bug_when>
    <thetext>Specification: https://html.spec.whatwg.org/multipage/forms.html
Multipage: https://html.spec.whatwg.org/multipage/#file-upload-state-(type=file)
Complete: https://html.spec.whatwg.org/#file-upload-state-(type=file)
Referrer: https://html.spec.whatwg.org/multipage/interaction.html

Comment:
Most user agents (Chrome, Firefox) seem to distinguish between space and
enter. Enter submits the form, even for radio buttons, space selects the
checkbox.

Should the spec be updated for this?

(Additionally, it&apos;s not very clear in the spec the different ways in which an
element can be activated)

Posted from: 103.21.125.76
User agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>114963</commentid>
    <comment_count>1</comment_count>
    <who name="Manish Goregaokar">manishearth</who>
    <bug_when>2014-11-15 06:17:35 +0000</bug_when>
    <thetext>(Submitter here)

The correct spec link is https://html.spec.whatwg.org/multipage/forms.html#radio-button-state-%28type=radio%29, though there are similar issues throughout the spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115147</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-11-19 22:09:35 +0000</bug_when>
    <thetext>This is mostly up to the browser. That it is possible for &quot;enter&quot; to submit the form is described here:

   https://html.spec.whatwg.org/multipage/#implicit-submission

...but I don&apos;t know what else we can say. We can&apos;t say &quot;space selects, enter submits&quot;, because what if the browser doesn&apos;t have a keyboard? Or has two &quot;enter&quot; keys? Or wants space bar to page down, and &quot;x&quot; to select?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115187</commentid>
    <comment_count>3</comment_count>
    <who name="Manish Goregaokar">manishearth</who>
    <bug_when>2014-11-20 03:52:13 +0000</bug_when>
    <thetext>So we only consider hitting theenter key as activation? This seems to say differently: 

https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#event-type-keydown

&gt; If the key is the &apos;Enter&apos; or &apos; &apos; key and the current focus is on a state-changing element, the default action MUST be to dispatch a click event, and a DOMActivate event if that event type is supported by the user agent (refer to activation triggers and behavior for more details)


So this means that &apos; &apos; and &apos;Enter&apos; should activate -- however as defined in the spec, activation means selection for a checkbox, which deviates from the spec.

I&apos;m not even sure if &apos;Enter&apos; should be triggering a click event.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115248</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-11-20 18:17:48 +0000</bug_when>
    <thetext>That sounds like a problem with the DOM3 Events spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115249</commentid>
    <comment_count>5</comment_count>
    <who name="Manish Goregaokar">manishearth</who>
    <bug_when>2014-11-20 18:22:48 +0000</bug_when>
    <thetext>Moving over to DOM3 as per Hixie&apos;s comment</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>118751</commentid>
    <comment_count>6</comment_count>
    <who name="Arthur Barstow">art.barstow</who>
    <bug_when>2015-03-21 15:11:56 +0000</bug_when>
    <thetext>Bulk move of all D3E bugs to the UI Events component.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123568</commentid>
    <comment_count>7</comment_count>
    <who name="Gary Kacmarcik">garykac</who>
    <bug_when>2015-10-07 04:24:15 +0000</bug_when>
    <thetext>Now tracking as: https://github.com/w3c/uievents/issues/33</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>