Closed
Bug 996095
Opened 11 years ago
Closed 11 years ago
Tabindex ignored when it's not in the int16_t range
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
VERIFIED
FIXED
mozilla32
People
(Reporter: nicktates, Assigned: bzbarsky)
Details
(Whiteboard: [bugday-20140820])
Attachments
(1 file)
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0 (Beta/Release)
Build ID: 20140314220517
Steps to reproduce:
Create elements (input or anchor) with a tabindex greater than 40000 and when tabbing through fields starting from the first, these elements are ignored and focus is never brought to them. See fiddle below:
http://jsfiddle.net/tatesn/hVv72/
Actual results:
Focus eventually ended up on the tab in the window, then moved around all elements outside the webpage, and never landed on the inputs with the large tabindex value.
Expected results:
As in other browsers, when tabbing from one field to the next, even if the tabindex is reasonably large, the element should receive focus when tabbed from the next lowest tabindex.
Updated•11 years ago
|
Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core
Assignee | ||
Comment 1•11 years ago
|
||
One issue here is in nsGenericHTMLElement::ParseAttribute:
992 if (aAttribute == nsGkAtoms::tabindex) {
993 return aResult.ParseIntWithBounds(aValue, -32768, 32767);
994 }
That code has been in place since the original fix for bug 171366.
But then nsFocusManager::GetNextTabIndex gets the string value of the attribute and re-parses as an integer, so the node has 32767 stored, but we're looking for a node with 40000, and we find no match.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Tabindex Ignored → Tabindex ignored when it's not in the int16_t range
Assignee | ||
Comment 2•11 years ago
|
||
Attachment #8424916 -
Flags: review?(bugs)
Assignee | ||
Updated•11 years ago
|
Whiteboard: [need review]
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Comment 3•11 years ago
|
||
Comment on attachment 8424916 [details] [diff] [review]
All 32-bit integers are valid values for tabindex; don't restrict it to the int16_t range during parsing
Huh, the old limitation is odd.
Attachment #8424916 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 4•11 years ago
|
||
Flags: in-testsuite?
Whiteboard: [need review]
Comment 5•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
Updated•10 years ago
|
QA Whiteboard: [good first verify]
[bugday-20140820]
Reproduced on:
Firefox 31.0
Verified on:
Firefox 32.0 Beta 8 (20140818191513)
Nightly 34.0a1 (20140820030202)
Comment 7•10 years ago
|
||
Verifying per comment 6.
Status: RESOLVED → VERIFIED
status-firefox31:
--- → affected
status-firefox32:
--- → fixed
status-firefox33:
--- → fixed
status-firefox34:
--- → fixed
Whiteboard: [bugday-20140820]
Updated•10 years ago
|
[testday-20140912]
Just for completeness, verified also on Firefox 33.0 beta 3.
Comment 9•10 years ago
|
||
Marking verified on Firefox 33 based on comment #8.
You need to log in
before you can comment on or make changes to this bug.
Description
•