[whatwg] Make stepUp() and stepDown() more developer-friendly

Mounir Lamouri mounir at lamouri.fr
Mon Nov 26 07:05:35 PST 2012

On 25/11/12 15:30, Scott González wrote:
> On Tue, Nov 20, 2012 at 5:55 PM, Ian Hickson <ian at hixie.ch> wrote:
>>> I can list out the steps we take for all conditions, but I'd like to
>>> hear everyone's thoughts on the various cases where you're suggesting
>>> that the methods do nothing.
>> Mostly I agree with Mounir here, but I'm curious about what you think
>> should happen for the case where there's no value, and the case where the
>> control isn't a numeric/date/time type. I could see an argument for
>> stepping from the default in the former case (Mounir, what do you think
>> about doing that?) but for the latter case I don't really see any point
>> doing anything but throw an exception, as Mounir suggested.
> For any non-parsable value (including no value), we start at 0, take the
> step, then confine to a valid step within min/max.

Why I don't really like in beginning at the closest valid value from 0
is that the general behaviour for the user might be a bit inconsistent.
I don't know if using the step base would really solve that but it might
work better. Using the value between max and min if max and min are
defined might work all the time though.


More information about the whatwg mailing list