Closed Bug 316546 Opened 19 years ago Closed 18 years ago

<label> takes focus instead of <input> when overflow: auto; is set on containing div

Categories

(Core :: Layout: Form Controls, defect)

x86
Windows XP
defect
Not set
trivial

Tracking

()

RESOLVED INVALID

People

(Reporter: bugzilla, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051107 Firefox/1.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051107 Firefox/1.5

When overflow: auto; is explicitly set on a <div> containing a <label> and an <input> and the <label> is associated with the <input>, when using the tab key to navigate the form the <label> will take focus instead of the <input>. The <input> takes focus on a subsequent tab press. This is contrary to behaviour specified in the HTML 4.01 recommendation.

Reproducible: Always

Steps to Reproduce:
1. Use the Tab key to cycle through form controls
2.
3.

Actual Results:  
Any <label> associated with an <input> is focused instead of the <input>

Expected Results:  
The <input> should be focused.
Attached file Test case
Test case demonstrating incorrect focus when using Tab to cycle through form controls.
No, it's the div with overflow:auto that's taking focus.
(In reply to comment #2)
> No, it's the div with overflow:auto that's taking focus.
> 

Ah, my mistake. It's still erroneous, is it not?
Well, overflow:auto and overflow:scroll divs are tabbable on purpose, so that's not a bug.
> overflow:auto and overflow:scroll divs are tabbable on purpose, so that's
> not a bug.
 
I've created Bug 316584 to update the related documentation on this.


Since a div with overflow: auto is tabbable and focusable by design, I'm resolving this bug as INVALID.
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: