Closed Bug 543107 Opened 14 years ago Closed 14 years ago

Calling click() on <input type=file> elements does not launch a file browse dialog.

Categories

(Firefox :: General, defect)

3.6 Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 36619

People

(Reporter: wescarr, Unassigned)

Details

(Keywords: html5)

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6

Chrome/Safari currently allow this behavior. It's desirable when you want to display an alternative UI for both selecting and displaying files and provides parity with features offered by current Flash-based uploaders.

Having input.click() work only in response to a user action seems like a reasonable restriction, if there is a security concern.

Reproducible: Always

Steps to Reproduce:
1. Include a <input type='file'> element in a web page.
2. Access the element via javascript
3. Call the element's click() method.
Actual Results:  
Nothing

Expected Results:  
A file browse dialog should appear, just as if the user had clicked on the "Browse..." button in the control.
Keywords: html5
Version: unspecified → 3.6 Branch
This looks to be a duplicate of Bug 36619.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.