Closed
Bug 206376
Opened 22 years ago
Closed 21 years ago
accesskey doesn't work when field type is "file"
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: danielc, Assigned: aaronlev)
References
()
Details
(Keywords: access, helpwanted, html4)
Attachments
(4 files, 2 obsolete files)
1.74 KB,
patch
|
aaronlev
:
review+
|
Details | Diff | Splinter Review |
616 bytes,
text/plain
|
Details | |
1.75 KB,
patch
|
jst
:
superreview+
|
Details | Diff | Splinter Review |
1.30 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4b) Gecko/20030506
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4b) Gecko/20030506
In forms used for submitting files, if a field is type="file" and that field has
an accesskey set, the browser doesn't jump to that field when hitting ALT-<LETTER>.
Reproducible: Always
Steps to Reproduce:
1. Go to the page shown above.
2. Hit ALT-O.
Actual Results:
Nothing.
Expected Results:
The cursor should move to the field labeled "Photo File."
Comment 1•22 years ago
|
||
Verified 20030516 PC/WinXP
->Keyboard navigation
Reporter | ||
Comment 2•22 years ago
|
||
The sample URI has been changed.
The new one is
http://www.bikesummer.org/2003/photos/bugzilla.php
The old one was
http://www.bikesummer.org/2003/photos/add.php
The old one is for public use on the website. I changed that version to use
<label> elements to define the accesskey. When using this syntax, the keyboard
navigation works as expected. None the less, the keyboard navigation should
still work for cases where the accesskey attribute is used inside the
<input type="file" />
Assignee | ||
Updated•21 years ago
|
Keywords: helpwanted
Comment 3•21 years ago
|
||
Updated•21 years ago
|
Attachment #150700 -
Flags: review?(aaronleventhal)
Assignee | ||
Comment 4•21 years ago
|
||
Comment on attachment 150700 [details] [diff] [review]
patch for 206376
Conditional r=aaronl if you change
|if (rv == NS_OK)| to either |if (NS_SUCCEEDED(rv))| or just use |if
(fileContent)|
If you use the second option you won't need to get rv in the QI.
Your patch also works with this case:
<label accesskey="c" for="bar">File <u>c</u>ontrol 2:</label> <input
type="file" id="bar">
That might have worked before, but I wanted to note that it's another case --
sometimes the accesskey is on the label.
Attachment #150700 -
Flags: review?(aaronleventhal) → review+
Comment 5•21 years ago
|
||
Aaron, my test case includes both scenario you mentioned and works fine. so
IMHO, what i need to is to modify the condition clause and that's it, right?
correct me if i miss/misunderstandard anything.
Assignee | ||
Comment 6•21 years ago
|
||
Yes it works. All you need to do is change the condition. You have r= with that.
Comment 7•21 years ago
|
||
modification of condition clause according Aaron's suggestion
Updated•21 years ago
|
Attachment #150900 -
Flags: superreview?(jst)
Comment 9•21 years ago
|
||
really sorry. need strong coffee
Attachment #150901 -
Attachment is obsolete: true
Updated•21 years ago
|
Attachment #150902 -
Flags: superreview?(jst)
Assignee | ||
Comment 10•21 years ago
|
||
Neo, I'm sorry but it's better to use
if (NS_FAILED(rv))
instead of
if (!NS_SUCCEEDED(rv))
When you have time you might want to look at
http://lxr.mozilla.org/seamonkey/source/xpcom/base/nsError.h
Comment 11•21 years ago
|
||
Comment on attachment 150902 [details] [diff] [review]
final patch
Yeah, use NS_FAILED()...
sr=jst
Attachment #150902 -
Flags: superreview?(jst) → superreview+
Comment 12•21 years ago
|
||
Aaron and jst, after a browse of nsDebug.h, i have a question that any reason
not use NS_ENSURE_SUCCESS(rv, rv)?
seems it both have warning message and return if failed.
Assignee | ||
Comment 13•21 years ago
|
||
(In reply to comment #12)
> Aaron and jst, after a browse of nsDebug.h, i have a question that any reason
> not use NS_ENSURE_SUCCESS(rv, rv)?
>
> seems it both have warning message and return if failed.
Use |NS_ENSURE_SUCCESS(rv, rv)| if you want to log an error.
Use |if (NS_FAILED(rv)) { return rv; }| if you don't
Comment 14•21 years ago
|
||
condition clause change
Assignee | ||
Comment 15•21 years ago
|
||
Nian, when you check in a fix, mark the bug fixed :)
Updated•21 years ago
|
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Comment 16•21 years ago
|
||
^_^
Updated•21 years ago
|
Attachment #150900 -
Flags: superreview?(jst)
Updated•6 years ago
|
Component: Keyboard: Navigation → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•