change event not fired for input/type=file when same path selected
Reported by
raymondc...@gmail.com,
Jan 19 2018
|
|||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36 Steps to reproduce the problem: 1. Build a form with a file type input field. 2. Add a simple change() handler to it. 3. Select a file, let's say c:\foo.txt and confirm your handler ran. 4. Now select the file *again*, and the handler won't run. Now, I think it may be fair to expect the change handler to not run if you pick the same file. But Chrome seems to be basing this on path only. I can make a whole new file w/ the same path and Chrome still won't run the change event. I noticed Firefox always runs the change event and I think that's the best choice here. What is the expected behavior? To always fire the change event. What went wrong? It didn't. :) Did this work before? N/A Does this work in other browsers? N/A Chrome version: 63.0.3239.132 Channel: stable OS Version: 10.0 Flash Version:
,
Jan 22 2018
This code pen should show it: https://codepen.io/cfjedimaster/pen/aEQeeK
,
Jan 22 2018
Thank you for providing more feedback. Adding requester "vamshi.kommuri@techmahindra.com" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jan 23 2018
Unable to reproduce the issue on chrome reported version 63.0.3239.132 using Windows-10 with steps mentioned below: 1) Launched chrome reported version and navigated to https://codepen.io/cfjedimaster/pen/aEQeeK 2) Opened Devtools -> Console 3) Uploaded file for the first time, on console seen the handler ran 4) Uploaded file again, seen the handler ran again @Reporter: Please find the attached screen cast for your reference and let us know if we missed anything in reproducing this issue, please try to test this issue by creating new profile with no apps and extensions in it and let us know if the issue still persist. Thanks!
,
Jan 23 2018
,
Jan 23 2018
I'm sorry if it wasn't clear. The issue is selecting the *same* file. You selected 3 different ones. (See step 4 above.)
,
Jan 23 2018
Thank you for providing more feedback. Adding requester "sc00335628@techmahindra.com" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Feb 5 2018
Edge: No "change" events on selecting same file path. Safari: No "change" events on selecting same file path. I think, changing the behavior will make the situation worse.
,
Feb 5 2018
How does it make it worse?
,
Feb 5 2018
If I’m reading the HTML Standard [1] correctly, the `change` event should fire *every* time the user activates a file input and makes a selection via a prompt. If that is correct, than this bug shouldn’t be closed until the relevant algorithm in the spec is updated, I think. [1]: https://html.spec.whatwg.org/multipage/input.html#file-upload-state-(type=file) |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by vamshi.k...@techmahindra.com
, Jan 22 2018Labels: Needs-Triage-M63 Triaged-ET Needs-Feedback