input type=file cannot accept focus using javascript
Categories
(Core :: Layout: Form Controls, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: gcgabfest, Assigned: emilio)
References
Details
(Keywords: regression)
Attachments
(3 files)
Comment 1•16 years ago
|
||
![]() |
||
Comment 2•16 years ago
|
||
Reporter | ||
Comment 3•16 years ago
|
||
Comment 4•16 years ago
|
||
Comment 6•11 years ago
|
||
Comment 7•11 years ago
|
||
Comment 8•9 years ago
|
||
Comment 10•6 years ago
|
||
I did a bit on testing on this bug, and I think this might have to more to do with trying to focus the element before loading is finished.
window.onload = () => {
document.querySelector("input[type=file]").focus();
}
This code can actually focuses the button inside the <input type=file>
.
When running the code from comment 7 the GetPrimaryFrame call inside HTMLInputElement::Focus returns null. (source)
Assignee | ||
Comment 11•6 years ago
|
||
Told Tom I'll take a quick look at this while I look to bug 1495621 too, so ni? so I don't forget :)
Assignee | ||
Comment 12•6 years ago
|
||
This is closer to what other UAs do, it's simpler, and fixes the bug.
It looks like the complexity of multiple buttons or what not is related to
bug 1188880, which is WONTFIX. We no longer have multiple buttons in the same
file input, so this is better IMO.
Assignee | ||
Updated•6 years ago
|
Comment 13•6 years ago
|
||
Comment 14•6 years ago
|
||
bugherder |
Comment 18•6 years ago
|
||
Bugbug thinks this bug is a regression, but please revert this change in case of error.
Description
•