Closed Bug 52815 Opened 24 years ago Closed 23 years ago

remove 3rd tab in an input[type="file"] form element tab cycle order

Categories

(Core :: Layout: Form Controls, defect, P3)

x86
Other
defect

Tracking

()

VERIFIED FIXED
mozilla1.2alpha

People

(Reporter: jameslariviere, Assigned: zhayupeng)

References

(Blocks 1 open bug)

Details

(Keywords: access, testcase)

Attachments

(2 files, 2 obsolete files)

DESCRIPTION:

extra tab in an input[type="file"] form element.

STEPS TO REPRODUCE:

view a test case I have for bug # 41819.
(http://bugzilla.mozilla.org/showattachment.cgi?attach_id=12896)

ACTUAL RESULTS:

As you tab through the form elements notice that the input[type="file"] does not
work as anticipated in that it takes 3 tabs to go through (1) for file path (2)
the button (3) whatever is "behind" the button. WIERD!

EXPECTED RESULTS:

I would think you tab through (1) file path (2) the button, than go onto the
next form element.

DOES NOT WORK CORRECTLY ON:

Win98 build 200091505 (9-14-00 nightly build I think)
Updating QA contact.
QA Contact: ckritzer → bsharma
Rod,

per your comments on bug 52813.

I changed the summary.

Currently nav4.08 tabs through the input file in one tab (ie5 in 2 tabs, [input
then button], and mozilla takes 3 tabs.

I suggest removing the third focused "behind the button" object out of the tab
order. I think it's kinda confusing to anyone tabbing through that element on
any form.
Summary: extra tab in an input[type="file"] form element → remove extra tab in an input[type="file"] form element
Adding test case.

Changing severity to minor since this is a cleanup issue and probably will
change when moving over to the new xbl widgets.

Unsure if this is a NEW or WONTFIX or INVALID since my opinion is slanted?
Severity: normal → minor
Keywords: testcase
Summary: remove extra tab in an input[type="file"] form element → remove 3rd tab in an input[type="file"] form element tab cycle order
Chris, once the file input has focus, the first tab press take it to an area 
frame with HTMLInputElement as content, the next tab press takes it to the 
nsFileControlFrame, and the third tab press takes it to the next correct 
tabbable element.

In a nutshell, the traversal object is having problems with anonymous content.
Assignee: rods → saari
Status: UNCONFIRMED → NEW
Ever confirmed: true
Yes, the tab traversal code definitely will get some attention real soon now.
Targeting Mozilla 1.0
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.0
Keywords: access
QA Contact Update
QA Contact: bsharma → vladimire
See also bug 90764, button in file upload control never appears to take focus
(and doesn't take focus onmousedown).
Blocks: focusnav
I believe bryner has a dup of this
Assignee: saari → bryner
Status: ASSIGNED → NEW
Status: NEW → ASSIGNED
Target Milestone: mozilla1.0 → mozilla0.9.9
*** Bug 90764 has been marked as a duplicate of this bug. ***
This is a major issue and is still happening with build 2002020103, adding
keyword nsbeta1
Keywords: nsbeta1
XBL form controls will not be turned on for 0.9.9.  -> 1.0.
Target Milestone: mozilla0.9.9 → mozilla1.0
Depends on: atfmeta
No longer depends on: atfmeta
Blocks: atfmeta
Minusing, per ADT triage
Keywords: nsbeta1nsbeta1-
Target Milestone: mozilla1.0 → mozilla1.2
Attached patch Patch (obsolete) — Splinter Review
Just skip the fileControlFrame in the GetNextTabIndexContent
Attached patch Patch (obsolete) — Splinter Review
Using disable bool instead of needTab
Attached patch PatchSplinter Review
sorry for my mistake, just ignore last patch
Comment on attachment 73497 [details] [diff] [review]
Patch

r=bryner
Attachment #73497 - Flags: review+
I've seen this the other day, and there was page content layed out on top of an
input box, that I tabbed into and I had no idea where I went.. dont know if it
was a mozilla layout issue, but I had to use IE to get a better rendered page,
so I could see/use that input box.
Attachment #73161 - Attachment is obsolete: true
Attachment #73158 - Attachment is obsolete: true
Comment on attachment 73497 [details] [diff] [review]
Patch

sr=attinasi
Attachment #73497 - Flags: superreview+
Comment on attachment 73497 [details] [diff] [review]
Patch

a=asa (on behalf of drivers) for checkin to the 1.0 trunk
Attachment #73497 - Flags: approval+
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Does this fix it so that when a script focuses the file control, that the
textfield gets focused?
arronl:Yes, see following code in nsFileControlFrame.cpp
void 
nsFileControlFrame::SetFocus(PRBool aOn, PRBool aRepaint)
{
  // Fix for Bug 6133 
  if (mTextFrame) {
    nsCOMPtr<nsIContent> content;
    mTextFrame->GetContent(getter_AddRefs(content));
    if (content) {
      content->SetFocus(mPresContext);
    }
  }
}
Looking at the testcase in attachement 17693, on the second tab through the file
input I would expect the "Browse..." button to have a dotted border.

Why does the button in the file input not show focus like the submit button does?

Good job removing the 3rd tab but I think that this needs a little more polish
(winTB build 3-20-03).
James, I agree with you. But I think it's another problem that layout should
paint the border for the button... Can you file another bug against this
problem? And I will take a look at it if you file it. Thanks :-)
Marking as verified fixed. :-)

The button focus issue is filed under bug 132557.
Status: RESOLVED → VERIFIED
->myself for tracking
Assignee: bryner → pete.zha
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: