Closed
Bug 377038
Opened 17 years ago
Closed 17 years ago
XUL tabIndex property should return 0 when tabindex attribute isn't specified
Categories
(Toolkit :: UI Widgets, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: enndeakin, Assigned: enndeakin)
Details
Attachments
(2 files)
3.41 KB,
patch
|
neil
:
first-review+
|
Details | Diff | Splinter Review |
414 bytes,
application/vnd.mozilla.xul+xml
|
Details |
Currently NaN is returned when the tabindex attribute isn't specified
Attachment #261143 -
Flags: first-review?(neil)
Assignee | ||
Comment 1•17 years ago
|
||
Assignee: nobody → enndeakin
Status: NEW → ASSIGNED
Comment 2•17 years ago
|
||
Comment on attachment 261143 [details] [diff] [review] return 0 instead of NaN I'm not convinced. In XUL, a tabIndex, even 0 or -1, overrides -moz-user-focus. Nit: use parseInt(foo) || 0
Attachment #261143 -
Flags: first-review?(neil)
Assignee | ||
Comment 3•17 years ago
|
||
Well, NaN isn't a valid return value for a method that returns an integer, so it needs to be changed to return something. The tabIndex property only overrides if the tabindex attribute on an element is specified. If the attribute is unspecified, the tabIndex property is never checked, so it can just return 0.
Comment 4•17 years ago
|
||
Comment on attachment 261143 [details] [diff] [review] return 0 instead of NaN OK, r=me if you use || 0 instead.
Attachment #261143 -
Flags: first-review+
Assignee | ||
Comment 5•17 years ago
|
||
Bug 377253 contains an automated testcase for this.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•17 years ago
|
Flags: in-testsuite-
You need to log in
before you can comment on or make changes to this bug.
Description
•