Range Inputs and Events
14/11/12 09:24 Filed in: Programming
The problem with onChange
is that it is allowed to trigger instantly on a change so in a mouse driven interface you can click on the value you want on the slider and it changes to the new value. On a touch driven interface (Mobile Safari in this case) it can report the first change it encounters - typically exactly 1 value different from its previous value.
allows the slider to be moved and the event is only triggered at the end of the action on both mouse driven and touch interfaces.
My test harness:
$event = "onMouseUp=\"submit();\" onTouchEnd=\"submit();\"";
<input type=range name=v value="<? print $_REQUEST[v] ?>" <? print $event ?> />
<? print $_REQUEST[v] ?>