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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>149398</bug_id>
          
          <creation_ts>2015-09-21 01:41:54 -0700</creation_ts>
          <short_desc>&lt;input&gt; of type=checkbox,radio,file doesn&apos;t fire `input` events</short_desc>
          <delta_ts>2020-05-05 05:57:35 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>HTML Editing</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.11</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>http://code.google.com/p/chromium/issues/detail?id=534245</see_also>
    
    <see_also>https://bugzilla.mozilla.org/show_bug.cgi?id=1206616</see_also>
          <bug_file_loc>http://jsbin.com/jojoji/edit?html,output</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>HasReduction, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Chris Rebert">webkit</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ashvayka</cc>
    
    <cc>d</cc>
    
    <cc>jonlee</cc>
    
    <cc>m.goleb+bugzilla</cc>
    
    <cc>m.kurz+webkitbugs</cc>
    
    <cc>rniwa</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1127602</commentid>
    <comment_count>0</comment_count>
    <who name="Chris Rebert">webkit</who>
    <bug_when>2015-09-21 01:41:54 -0700</bug_when>
    <thetext>Per the following portions of the HTML specification:
* https://html.spec.whatwg.org/multipage/forms.html#checkbox-state-(type=checkbox):event-input-input
* https://html.spec.whatwg.org/multipage/forms.html#radio-button-state-(type=radio):event-input-input
* https://html.spec.whatwg.org/multipage/forms.html#file-upload-state-(type=file):event-input-input

when the user changes the checkedness of an &lt;input type=&quot;checkbox&quot;&gt; or &lt;input type=&quot;radio&quot;&gt;, or when a user changes the selected files of an &lt;input type=&quot;file&quot;&gt;, the browser is supposed to fire an `input` event (https://developer.mozilla.org/en-US/docs/Web/Events/input ) at that &lt;input&gt; element.
Safari/WebKit doesn&apos;t currently comply with this, and doesn&apos;t fire `input` events in these cases.

Steps to reproduce:
1. Open http://jsbin.com/jojoji/edit?html,output in Chrome.
2. Check the checkbox.
3. Click one of the two radio buttons.
4. Click &quot;Choose File&quot; and select a file.

Expected results:
After each of steps 2 thru 4, an alert box with the message &quot;input!&quot; should be displayed (because an `input` event should be fired at the respective &lt;input&gt; element).

Actual results:
No alert boxes are shown because no `input` events were fired.

Other info:
Equivalent Chrome bug: https://code.google.com/p/chromium/issues/detail?id=534245</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1151836</commentid>
    <comment_count>1</comment_count>
    <who name="Chris Rebert">webkit</who>
    <bug_when>2015-12-31 20:38:43 -0800</bug_when>
    <thetext>Erm, obviously I meant Safari rather than Chrome in the Steps to Reproduce.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1161489</commentid>
    <comment_count>2</comment_count>
    <who name="Chris Rebert">webkit</who>
    <bug_when>2016-02-02 19:05:19 -0800</bug_when>
    <thetext>HTML spec bug: https://github.com/whatwg/html/issues/601</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1180135</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2016-04-02 19:27:53 -0700</bug_when>
    <thetext>&lt;rdar://problem/25513372&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1199608</commentid>
    <comment_count>4</comment_count>
    <who name="Chris Rebert">webkit</who>
    <bug_when>2016-06-06 10:33:33 -0700</bug_when>
    <thetext>Firefox 49 now fires these events.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1309276</commentid>
    <comment_count>5</comment_count>
    <who name="Domenic Denicola">d</who>
    <bug_when>2017-05-16 13:57:57 -0700</bug_when>
    <thetext>Some tests added at http://w3c-test.org/html/semantics/forms/the-input-element/checkbox-click-events.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1394518</commentid>
    <comment_count>6</comment_count>
    <who name="">m.kurz+webkitbugs</who>
    <bug_when>2018-01-30 06:12:49 -0800</bug_when>
    <thetext>The Chrome team marked that bug as fixed as well with Chrome 66:
https://bugs.chromium.org/p/chromium/issues/detail?id=534245#c18</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1503192</commentid>
    <comment_count>7</comment_count>
    <who name="Lucas Forschler">lforschler</who>
    <bug_when>2019-02-06 09:18:33 -0800</bug_when>
    <thetext>Mass move bugs into the DOM component.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1648805</commentid>
    <comment_count>8</comment_count>
    <who name="Alexey Shvayka">ashvayka</who>
    <bug_when>2020-05-04 16:14:04 -0700</bug_when>
    <thetext>(In reply to Chris Rebert from comment #0)
&gt; 1. Open http://jsbin.com/jojoji/edit?html,output in Chrome.

(In reply to Domenic Denicola from comment #5)
&gt; Some tests added at
&gt; http://w3c-test.org/html/semantics/forms/the-input-element/checkbox-click-
&gt; events.html

As of Safari 13.1, jsbin.com example works as expected (for all &lt;input&gt; types) and web platform tests do pass.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1649164</commentid>
    <comment_count>9</comment_count>
    <who name="">m.kurz+webkitbugs</who>
    <bug_when>2020-05-05 05:57:35 -0700</bug_when>
    <thetext>More specific details on the fixes:

Starting with Safari 12.1 the radio inputs and checkbox inputs fire “click”, “input”, and “change” events in order when clicked.
See
https://bugs.webkit.org/show_bug.cgi?id=190223
https://trac.webkit.org/changeset/236779/webkit
https://webkit.org/blog/8419/release-notes-for-safari-technology-preview-67/
-&gt; &quot;Fixed radio inputs and checkbox inputs to fire “click”, “input”, and “change” events in order when clicked&quot;
Preview 67 was mentioned in the 12.1 blog post here (see bottom): https://webkit.org/blog/8718/new-webkit-features-in-safari-12-1/

Starting with Safari 13.1 finally the file input fires an input event before the change event:
https://bugs.webkit.org/show_bug.cgi?id=204292
https://trac.webkit.org/changeset/252768/webkit
https://webkit.org/blog/9672/release-notes-for-safari-technology-preview-97/
-&gt; &quot;Changed the file input to fire an input event before the change event&quot;
Preview 97 was mentioned in the 13.1 blog post here (see bottom):
https://webkit.org/blog/10247/new-webkit-features-in-safari-13-1/</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>