<?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>187084</bug_id>
          
          <creation_ts>2018-06-26 22:40:59 -0700</creation_ts>
          <short_desc>`change` event for input[type=file] does not fire when different file with same name is selected</short_desc>
          <delta_ts>2022-10-07 15:22:15 -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>DOM</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>macOS 10.13</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=227799</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>246158</dependson>
          <blocked>246143</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Mariko Kosaka">mariko.kosaka</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>aestes</cc>
    
    <cc>ahmad.saleem792</cc>
    
    <cc>akeerthi</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>commit-queue</cc>
    
    <cc>d</cc>
    
    <cc>mparmaksiz54</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>1436859</commentid>
    <comment_count>0</comment_count>
    <who name="Mariko Kosaka">mariko.kosaka</who>
    <bug_when>2018-06-26 22:40:59 -0700</bug_when>
    <thetext>https://codepen.io/anon/pen/eKPJda?editors=1010

Steps to reproduce:
1. [input]select file1 on &lt;input type=&quot;file&quot;&gt; 
  =&gt; change event is fired
2. [input]select file1 again
  =&gt; change event is NOT fired
3. Delete the file1, rename file2 to same name as file2
4. [input]select file2 (same file name as file1) 
  =&gt; change event is NOT fired

video : https://youtu.be/hrt6ll73kNk

Expected:
Change event is fired every-time user select a file on prompt. Regardless of filename or even when same file is selected twice.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1437002</commentid>
    <comment_count>1</comment_count>
    <who name="Mariko Kosaka">mariko.kosaka</who>
    <bug_when>2018-06-27 10:41:14 -0700</bug_when>
    <thetext>Typo on reproduce instruction: 
3. Delete the file1, rename file2 to same name as *file1*</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1503317</commentid>
    <comment_count>2</comment_count>
    <who name="Lucas Forschler">lforschler</who>
    <bug_when>2019-02-06 09:19:08 -0800</bug_when>
    <thetext>Mass move bugs into the DOM component.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1775692</commentid>
    <comment_count>3</comment_count>
    <who name="Domenic Denicola">d</who>
    <bug_when>2021-07-08 09:44:46 -0700</bug_when>
    <thetext>See also https://bugs.webkit.org/show_bug.cgi?id=227799</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1890081</commentid>
    <comment_count>4</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-08-09 13:34:06 -0700</bug_when>
    <thetext>I am able to reproduce this bug in Safari 15.6 on macOS 12.5 and when selecting same file again, there is no &quot;change event&quot;, it is only fired when I select another file. It is matching with Chrome Canary 106 but differs from Firefox Nightly 105, which fires change event every time I select file even if it is same file. Just wanted to share updated results. Thanks!

Also I think, this might be same as 227799 but just going to update this. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1890352</commentid>
    <comment_count>5</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-08-10 10:59:56 -0700</bug_when>
    <thetext>&lt;rdar://problem/98460303&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1890419</commentid>
    <comment_count>6</comment_count>
    <who name="Aditya Keerthi">akeerthi</who>
    <bug_when>2022-08-10 15:13:25 -0700</bug_when>
    <thetext>https://bugs.webkit.org/show_bug.cgi?id=227799 is related, and is a nicer way of handling (2), where the same file and filename are selected.

I think we should still fire a change event for (4) though, when the name is changed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1902933</commentid>
    <comment_count>7</comment_count>
    <who name="Richard Robinson">richard_robinson2</who>
    <bug_when>2022-10-03 14:46:32 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/4943</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1903672</commentid>
    <comment_count>8</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-10-05 22:58:42 -0700</bug_when>
    <thetext>Committed 255209@main (5374937e8566): &lt;https://commits.webkit.org/255209@main&gt;

Reviewed commits have been landed. Closing PR #4943 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1903761</commentid>
    <comment_count>9</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2022-10-06 08:38:56 -0700</bug_when>
    <thetext>Re-opened since this is blocked by bug 246158</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1903778</commentid>
    <comment_count>10</comment_count>
    <who name="Richard Robinson">richard_robinson2</who>
    <bug_when>2022-10-06 09:40:39 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/5089</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1904172</commentid>
    <comment_count>11</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-10-07 15:22:13 -0700</bug_when>
    <thetext>Committed 255297@main (14b28281c8d0): &lt;https://commits.webkit.org/255297@main&gt;

Reviewed commits have been landed. Closing PR #5089 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>