Closed
Bug 561664
Opened 15 years ago
Closed 13 years ago
document.activeElement should never return native anonymous content
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: smaug, Assigned: smaug)
Details
Attachments
(1 file, 1 obsolete file)
5.00 KB,
patch
|
enndeakin
:
review+
|
Details | Diff | Splinter Review |
Currently document.activeElement may return the input element inside type="file". Content JS gets then an exception when it tries to access the element.
Comment 2•13 years ago
|
||
This is causing problems for us in jQuery UI. We wrap elements for certain animations, and the wrapping causes elements to lose focus, so we reset focus after wrapping. However, if a file input has focus, then we try setting the focus on the exposed text input, which is no longer in the document (not sure why). jQuery UI bug: http://bugs.jqueryui.com/ticket/8288 Reduced test case using jQuery UI: http://jsfiddle.net/2efq2/8/ Reduced test case using plain JavaScript/DOM: http://dev-test.nemikor.com/bugs/firefox/input-type-file-activeelement.html
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → bugs
Assignee | ||
Comment 3•13 years ago
|
||
Attachment #620830 -
Flags: review?
Assignee | ||
Comment 4•13 years ago
|
||
Comment on attachment 620830 [details] [diff] [review] patch https://tbpl.mozilla.org/?tree=Try&rev=52113d2992a5
Attachment #620830 -
Flags: review? → review?(enndeakin)
Updated•13 years ago
|
Attachment #620830 -
Flags: review?(enndeakin) → review+
Assignee | ||
Comment 5•13 years ago
|
||
Bah, the patch revealed another bug.
Assignee | ||
Comment 6•13 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=527d379c12aa
Attachment #620830 -
Attachment is obsolete: true
Attachment #621005 -
Flags: review?(enndeakin)
Assignee | ||
Comment 7•13 years ago
|
||
Neil, the patch doesn't change the focusing behavior, but it is just that test_bug430351.html tests currently the_native_anon_button_inside_file_input != <input type="file"> With the patch that becomes <input type="file"> != <input type="file">
Updated•13 years ago
|
Attachment #621005 -
Flags: review?(enndeakin) → review+
Assignee | ||
Comment 8•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/032d43b1770f
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•