W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2012

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

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 20 Nov 2012 22:55:52 +0000 (UTC)
To: Scott González <scott.gonzalez@gmail.com>
Message-ID: <Pine.LNX.4.64.1211202253300.16964@ps20323.dreamhostps.com>
Cc: "whatwg@lists.whatwg.org" <whatwg@lists.whatwg.org>, Mounir Lamouri <mounir@lamouri.fr>
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?


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

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 21 November 2012 00:02:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:11 GMT