Closed Bug 1004356 Opened 11 years ago Closed 6 years ago

file input doesn't focus with JavaScript

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

29 Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 505355

People

(Reporter: info, Unassigned)

References

()

Details

(Keywords: access)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.131 Safari/537.36 Steps to reproduce: In a web app I developed called Easy Chirp, a widget contains a link that when clicked, opens a form and focuses a file input element. I clicked the link. To reproduce: 1. Log into Easy Chirp at http://www.easychirp.com/ 2. Click "Write Tweet". 3. Click "Add Image" Actual results: The form displays the form as expected, but the file input (labeled "Local path to image") is not focused. Expected results: The file input should be focused after clicking "Add Image". This works correctly in Chrome, Safari, Opera, and even IE.
It would be great to get a test case that doesn't involve signing in via twitter.
Component: Untriaged → Event Handling
Product: Firefox → Core
Adding jsFiddle example to this bug's URL field. http://jsfiddle.net/weboverhauls/N46Ne/1/
How is this bug different from bug 505355?
Depends on: 505355
Component: Event Handling → User events and focus handling

Looks like the problem can be reproduced with the following, smaller example:

data:text/html,<style> input { margin-top: 40cm } </style> <input type="file" id="i1"> <script> document.getElementById("i1").focus(); </script>

(In reply to Boris Zbarsky [:bzbarsky, bz on IRC] from comment #4)

How is this bug different from bug 505355?

Yea, looks like a dup of 505355.

Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: