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

On 20/11/12 22:55, Ian Hickson wrote:
> On Tue, 20 Nov 2012, Scott González wrote:
>>
>> Can you explain why these methods should be no-ops if the value is above 
>> the max or below the min? In jQuery UI, we decided that using these 
>> methods should always result in a valid value.
> 
> I actually missed that in Mounir's suggestion, and the spec now rounds to 
> the nearest allowed value in that case, rather than doing nothing.
> 
> Mounir: is that ok?

As said in my reply to "Forms-related feedback" thread, I think it is
weird to have stepDown() going up or stepUp() going down. Users should
understand that they can't go down if the down arrow isn't doing nothing.
FWIW, this is the behaviour Opera and Chrome UI's have. This is also the
behaviour stepUp() and stepDown() have in Gecko and Presto.

>> 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.

I also replied about the no value case in "Forms-related feedback"
thread. I believe it might be better to set the value to something. I'm
not sure which value should be used for that.

Cheers,
--
Mounir

Received on Wednesday, 21 November 2012 14:45:01 UTC