Bug 187084
Summary: | `change` event for input[type=file] does not fire when different file with same name is selected | ||
---|---|---|---|
Product: | WebKit | Reporter: | Mariko Kosaka <mariko.kosaka> |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | aestes, ahmad.saleem792, akeerthi, ap, bfulgham, commit-queue, d, mparmaksiz54, rniwa, webkit-bug-importer, wenson_hsieh |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari Technology Preview | ||
Hardware: | Mac | ||
OS: | macOS 10.13 | ||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=227799 | ||
Bug Depends on: | 246158 | ||
Bug Blocks: | 246143 |
Mariko Kosaka
https://codepen.io/anon/pen/eKPJda?editors=1010
Steps to reproduce:
1. [input]select file1 on <input type="file">
=> change event is fired
2. [input]select file1 again
=> 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)
=> 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.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Mariko Kosaka
Typo on reproduce instruction:
3. Delete the file1, rename file2 to same name as *file1*
Lucas Forschler
Mass move bugs into the DOM component.
Domenic Denicola
See also https://bugs.webkit.org/show_bug.cgi?id=227799
Ahmad Saleem
I am able to reproduce this bug in Safari 15.6 on macOS 12.5 and when selecting same file again, there is no "change event", 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!
Radar WebKit Bug Importer
<rdar://problem/98460303>
Aditya Keerthi
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.
Richard Robinson
Pull request: https://github.com/WebKit/WebKit/pull/4943
EWS
Committed 255209@main (5374937e8566): <https://commits.webkit.org/255209@main>
Reviewed commits have been landed. Closing PR #4943 and removing active labels.
WebKit Commit Bot
Re-opened since this is blocked by bug 246158
Richard Robinson
Pull request: https://github.com/WebKit/WebKit/pull/5089
EWS
Committed 255297@main (14b28281c8d0): <https://commits.webkit.org/255297@main>
Reviewed commits have been landed. Closing PR #5089 and removing active labels.