Closed
Bug 771561
Opened 12 years ago
Closed 11 years ago
stepUp() and stepDown() shouldn't be a no-op when value is NaN
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla28
People
(Reporter: mounir, Assigned: jwatt)
References
()
Details
(Whiteboard: [qa-])
Attachments
(1 file)
(deleted),
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
I think we could do:
1. for stepDown(), we set the value to max if it exists, to stepbase otherwise;
for stepUp(), we set the value to min if it exists, to stepbase otherwise.
2. for stepDown() we set the value to stepabase - step;
for stepUp() we set the value to stepbase + step.
3. for stepDown and stepUp() we set the value to stepBase.
Chrome's behavior is a mix between 2 and 3.
Opera's behavior is 1.
Maybe UX should be involved there.
Assignee | ||
Comment 1•12 years ago
|
||
I think this is too low-level for UX, based on past experience.
I would vote for 1.
Assignee | ||
Comment 2•11 years ago
|
||
Assignee: nobody → jwatt
Attachment #8334065 -
Flags: review?(bugs)
Assignee | ||
Comment 3•11 years ago
|
||
Note that the spec now defines the behavior here:
http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#dom-input-stepup
Where it says:
If applying the algorithm to convert a string to a number to
the string given by the element's value does not result in an
error, then let value be the result of that algorithm.
Otherwise, let value be zero.
So we should use zero.
Updated•11 years ago
|
Attachment #8334065 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 4•11 years ago
|
||
Comment 5•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Updated•11 years ago
|
Whiteboard: [qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•