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

Issue 709983 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Open file upload from javascript

Reported by miguel.s...@gmail.com, Apr 10 2017

Issue description

Steps to reproduce the problem:
1. On a mobile phone 
2. http://stackoverflow.com/questions/43324130/open-file-upload-from-select-options-not-working-in-mobile

What is the expected behavior?
It should open the file upload?

What went wrong?
It does nothing, although it works good, in desktop.

Did this work before? N/A 

Chrome version: 57.0.2987.132  Channel: stable
OS Version: 6.0.1
Flash Version: 

This does not pose any security risk, since the user needs to confirm or click "so there is an intent or wish" of the user to click that option and upload a file. Anyway in desktop the behaviour works, so why not on mobile?
 
It works on chrome for windows,  for MAC does not..

The click on the select popup comes from user context, so i think google for mac should allow the next click to be triggered from the "onchange" event of the select html!

This works on chrome for window.. why not on mac?



Firefox also works but not on the latest versions aurora and beta for MAC. But  version 52 it does. Is this a issue with the Mac OS / IOS or the browser? 
Labels: Needs-Feedback
Hello

Thanks for reporting the issue. Can you please attach the file and also provide your device details, like name, model? Also, please provide logcat/bugreport and video/screenshot of the issue, if any.
You can test by your self, open that url on a desktop and you will see it will open the file upload dialog. Then open on any android i guess. I believe this is because the script is calling this events:

Click on the [+] then trigger on change event of the select element, which shows a dialog, and then, trigger a click event on a hidden file upload html input file type. And is the particular click event of the input file type that is not triggered maybe because its not a "direct" click.. Although in this case the on change is caused from an user interaction, and thus, can be considered as original from user input so.. that "context" should be passed on and allowed to create a simulated click on a secundary btn in this case the  hidden file upload. This looks to be very different across browser, but either way i believe this should work that would be the correct behaviour.
Project Member

Comment 5 by sheriffbot@chromium.org, Apr 15 2017

Cc: ppolise...@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "ppolisetty@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: WontFix (was: Unconfirmed)
***Bulk edit***

Closing due to inactivity, please feel free to reopen if needed.

Sign in to add a comment