New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 803850 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

change event not fired for input/type=file when same path selected

Reported by raymondc...@gmail.com, Jan 19 2018

Issue description

UserAgent: 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:
 
Cc: vamshi.k...@techmahindra.com
Labels: Needs-Triage-M63 Triaged-ET Needs-Feedback
Thanks for filing the issue!

@Reporter: Could you please share a sample test file/URL which helps to triage the issue in a better way from ET end.
This code pen should show it: https://codepen.io/cfjedimaster/pen/aEQeeK
Project Member

Comment 3 by sheriffbot@chromium.org, Jan 22 2018

Labels: -Needs-Feedback
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
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!
803850.mp4
2.5 MB View Download
Cc: viswatej...@techmahindra.com
Labels: Needs-Feedback
I'm sorry if it wasn't clear. The issue is selecting the *same* file. You selected 3 different ones. (See step 4 above.)
Project Member

Comment 7 by sheriffbot@chromium.org, Jan 23 2018

Cc: sc00335...@techmahindra.com
Labels: -Needs-Feedback
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

Comment 8 by tkent@chromium.org, Feb 5 2018

Components: -Blink>HTML Blink>Forms>File
Owner: tkent@chromium.org
Status: WontFix (was: Unconfirmed)
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.


How does it make it worse? 
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