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>.
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.
Comment on attachment 71560 [details] [diff] [review] patch for textbox.xml, v1.0 sr=blake
Attachment #71560 - Flags: superreview+
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 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+
law has checked this fix in.
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
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.