tabindex not working in XUL dialogs

VERIFIED FIXED in mozilla0.9.9

Status

()

Core
Event Handling
--
major
VERIFIED FIXED
16 years ago
16 years ago

People

(Reporter: Bill Law, Assigned: Brian Ryner (not reading))

Tracking

Trunk
mozilla0.9.9
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

16 years ago
In the course of trying to get the new page setup dialog (see bug 113727) 
working, I found that using the tabindex= attribute on XUL elements didn't work 
worth a darn.

After some investigation, I found that the mCurrentTabIndex member of 
nsEventStateManager was not being set properly when focusing certain XUL 
widgets (specifically, <textbox>s).  It was keeping its default initial value 
(0) so the tabbing order jumped to the dialgo buttons before going to the 
tab "group" with tabindex="2".

The second panel of this new page setup dialog has a group of 4 <textbox>s (all 
with tabindex="1"), then a group of 3 <menulist>s (with tabindex="2"), then a 
group of 3 more <menulist>s (with tabindex="3".  Focus is initially in the 
first <textbox>.

Tabbing order is through the 4 <textbox>s, then the two buttons, then the first 
3 <menulist>s, then the last 3 <menulist>s.

In addition, clicking in any of the <textbox>s to give it focus didn't affect 
the tab order.  E.g., if focus was on one of the <menulist>s, then clicking in 
a <textbox>, then tabbing, sends focus to the first <menulist> in the group 
that had focus before clicking in the <textbox>.

The theory is that because the <textbox> binding has an <html:input> anonymous 
content element, when focus goes to the <html:input>, the "current tab index" 
is set to zero, rather than the tabindex attribute value of the parent 
<textbox>.
(Reporter)

Comment 1

16 years ago
Created attachment 71560 [details] [diff] [review]
patch for textbox.xml, v1.0

Lo and behold, this is easy to fix by simply propagating the tabindex attribute
from the <textbox> to its child <html:input>.

Brian, can you review?

I'm going to nominate this and try to get it in mozilla0.9.9.
(Reporter)

Updated

16 years ago
Keywords: nsbeta1
Target Milestone: --- → mozilla0.9.9

Comment 2

16 years ago
Comment on attachment 71560 [details] [diff] [review]
patch for textbox.xml, v1.0

sr=blake
Attachment #71560 - Flags: superreview+
(Reporter)

Comment 3

16 years ago
Comment on attachment 71560 [details] [diff] [review]
patch for textbox.xml, v1.0

r=sgehani (Samir was just here and said so)
Attachment #71560 - Flags: review+

Comment 4

16 years ago
Comment on attachment 71560 [details] [diff] [review]
patch for textbox.xml, v1.0

a=asa (on behalf of drivers) for checkin to 0.9.9
Attachment #71560 - Flags: approval+
(Assignee)

Comment 5

16 years ago
law has checked this fix in.
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED

Updated

16 years ago
QA Contact: madhur → rakeshmishra

Comment 6

16 years ago
Verified on the trunk build 2002-04-24-12-trunk on Windows 2000.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.