<?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>22467</bug_id>
          
          <creation_ts>2013-06-25 21:31:44 +0000</creation_ts>
          <short_desc>&lt;select&gt; should have “oninput”</short_desc>
          <delta_ts>2016-04-25 22:49:42 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          <see_also>https://bugzilla.mozilla.org/show_bug.cgi?id=1024350</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>whatwg-resolved</status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Felipe">felipe</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          <cc>d</cc>
    
    <cc>mike</cc>
    
    <cc>mounir</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>stommepoes</cc>
    
    <cc>travil</cc>
    
    <cc>w3bugs</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>89854</commentid>
    <comment_count>0</comment_count>
    <who name="Felipe">felipe</who>
    <bug_when>2013-06-25 21:31:44 +0000</bug_when>
    <thetext>It’s hugely unintuitive that &lt;select&gt; inputs don’t fire an “oninput” event.

Anything that can affect the form’s submitted data should be firing “oninput” to simplify form validation etc.



Test case:


&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta charset=&quot;utf-8&quot;&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;form action=&quot;javascript:void(0)&quot; oninput=&quot;console.log(this)&quot;&gt;
        &lt;label&gt;Changing this doesn’t fire “oninput”:
            &lt;select name=&quot;foo&quot;&gt;&lt;option&gt;1&lt;/option&gt;&lt;option&gt;2&lt;/option&gt;&lt;/select&gt;
        &lt;/label&gt;
        &lt;br&gt;
        &lt;br&gt;
        &lt;label&gt;… but changing this does:
            &lt;input type=&quot;text&quot; name=&quot;bar&quot;&gt;
        &lt;/label&gt;
    &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89920</commentid>
    <comment_count>1</comment_count>
    <who name="Mallory">stommepoes</who>
    <bug_when>2013-06-26 19:43:31 +0000</bug_when>
    <thetext>I don&apos;t understand how a select could fire an oninput event. This event doesn&apos;t fire upon a change. It fires when a visible/typeable character appears in the element from the input text but you don&apos;t input it.

I&apos;d rather the webkit version was fixed to match the others regarding textareas though. And I&apos;d like IE to accept removing text as counting :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89921</commentid>
    <comment_count>2</comment_count>
    <who name="Mallory">stommepoes</who>
    <bug_when>2013-06-26 19:47:27 +0000</bug_when>
    <thetext>Le sigh, looks like my trackpad grabbed a chunk of my text and overwrote it?

It fires when a visible/typeable character appears in the element from the input device (keyboard), but this isn&apos;t what happens with a select input. No text is inputted.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89922</commentid>
    <comment_count>3</comment_count>
    <who name="Felipe">felipe</who>
    <bug_when>2013-06-26 19:49:09 +0000</bug_when>
    <thetext>Where are you reading anything about “visible/typeable character” … ?

http://www.whatwg.org/specs/web-forms/current-work/#the-change

“This event must be fired on a control whenever the value of the control changes due to input from the user …”

Per the above, changing the value of a &lt;select&gt; makes perfect sense to fire “oninput”.

IE 10 has fixed the “oninput” implementation, which was horribly broken in IE 9.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102560</commentid>
    <comment_count>4</comment_count>
    <who name="Felipe">felipe</who>
    <bug_when>2014-03-18 14:03:33 +0000</bug_when>
    <thetext>WebKit appears to be moving on this, FYI:

https://bugs.webkit.org/show_bug.cgi?id=117526</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123264</commentid>
    <comment_count>5</comment_count>
    <who name="Chris Rebert">w3bugs</who>
    <bug_when>2015-09-21 21:37:00 +0000</bug_when>
    <thetext>&lt;select&gt;s do fire &quot;input&quot; events per the current spec, and Chrome &amp; Safari implement this. Firefox and Edge don&apos;t yet implement this.

&quot;When the user agent is to send &lt;select&gt; update notifications, queue a task to first fire a simple event that bubbles named `input` at the &lt;select&gt; element, [...]&quot;
-- https://html.spec.whatwg.org/multipage/forms.html#send-select-update-notifications</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123265</commentid>
    <comment_count>6</comment_count>
    <who name="Chris Rebert">w3bugs</who>
    <bug_when>2015-09-21 21:39:47 +0000</bug_when>
    <thetext>MS Edge bug: https://connect.microsoft.com/IE/feedback/details/1816207</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126136</commentid>
    <comment_count>7</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2016-04-25 22:49:42 +0000</bug_when>
    <thetext>HTML5.1 Bugzilla Bug Triage: Works for me!

(Edge issue now tracked at: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/4660045/ seems like it&apos;s assigned to me...)

If this resolution is not satisfactory, please copy the relevant bug details/proposal into a new issue at the W3C HTML5 Issue tracker: https://github.com/w3c/html/issues/new where it will be re-triaged. Thanks!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>