mobiscroll
mobiscroll copied to clipboard
First selected value does not work correctly with just one wheel
Hi,
To reproduce the problem from the subject line:
-
change the demo example to use just one wheel:
var group = {}; var wheels = [group]; var wheel = {}; for (var j = 0; j < 100; j++) { wheel[j] = j; } group['Fruit'] = wheel;
$('#custom').scroller({ width: 400, wheels: wheels });
2: for the input field set the default value to empty:
<div data-role="fieldcontain">
<label for="custom">Custom (Fruits :D)</label>
<input type="text" name="custom" id="custom" class="mobiscroll" value="" />
</div>
Click on the input (do not scroll), and then just click set. In the input, the value -1 will be set. If you repeat the process, you will get -2, -3, etc.
I'm expecting it to be 0, the first and also selected element from the wheel.
Thanks, Ioana
Fixed in v1.6
Thanks for the fix, works fine with v1.6.