fryn / html5slider

<input type=range> polyfill for Firefox
http://fryn.github.io/html5slider/
180 stars 48 forks source link

Slider requires extra click to update value #1

Closed xlegs closed 12 years ago

xlegs commented 13 years ago

The following code produces a slider with its current value displayed:

< input type="range" min="0" max="100" value="0" step="1" onchange="showValue(this.value,'lights')" /> < span id="lights">0

function showValue(newValue,range) { document.getElementById(range).innerHTML=newValue; }

This works in Webkit browsers (Safari and Chrome) as well as Opera.

When using your script, the value does not update on the first slide. After a second slide, everything is normal.

While this is small, it degrades user experience.

P.S. Awesome job. Having this for IE would be a godsend.

fryn commented 13 years ago

I can't reproduce this. Could you provide more specific steps? What OS and version of Firefox are you running?