[whatwg] Ignore min and max if min > max

Hi,

Currently, the specification seems to take care of min > max by simply
making the element suffering from a value underflow such as a value
overflow. Also, <input type='range'> has a special behaviour in that
situation. However, if you try different implementations, the behaviours
when min > max a widely different and generally speaking, such context
can create pretty broken UI: a slider that can't move, a number spinner
that doesn't allow changing the number's value, etc.

I believe that having a special behaviour when min > max would be
appropriate here. Basically, the min and max attributes should be
ignored in that situation. That means that the element's 'minimum' and
'maximum' should be ignored in that situation unless there is a 'default
minimum' or a 'default maximum' (which would be used).

Adding this to the specification would help having a decent fallback
when the attributes are broken instead of broken form controls.

FWIW, Chrome's implementation of <input type='range'> seems to simply
ignore min and max when min > max. Opera doesn't show any UI in that case.

Cheers,
--
Mounir

Received on Wednesday, 17 April 2013 13:21:09 UTC