W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2013

[whatwg] Implementation issue: step mismatch handling for <input type=range>

From: Jonathan Watt <jwatt@jwatt.org>
Date: Thu, 17 Jan 2013 19:29:44 +0000
Message-ID: <50F85128.3070503@jwatt.org>
To: whatwg@lists.whatwg.org
I'm working on implementing <input type=range> for Gecko and have encountered 
what I believe to be an issue in the spec.

Step 1 of the algorithm to find the "step base":


says "If the element has a min content attribute...to the value of the min 
content attribute...". Should this not talk about "minimum" rather than "min 
content attribute"? It would otherwise seem to give bad results in the case of 
<input type=range>, which has a default minimum of zero (a default minimum makes 
sense in the case of type=range, since an unbounded slider would be impossible 
for a user to interact with). Consider for example:

   <input type=range value=-1 max=1 step=3>

As it stands, the current spec text says that the "step base" is -1 (from the 
'value' content attribute), the 'minimum' is zero (from the default minimum), 
the 'maximum' is 1, and the step is 3. As a result, an implementation would seem 
to be directed to enter an infinite loop applying the paragraphs beginning with 
"When the element is suffering from an underflow..." and "When the element is 
suffering from a step mismatch..." in:


If the step base considered the 'minimum' instead of the 'min' content 
attribute, then the step base would be zero, and thus the value would settle at 

Received on Thursday, 17 January 2013 19:30:18 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:19 UTC