mobiscroll icon indicating copy to clipboard operation
mobiscroll copied to clipboard

First selected value does not work correctly with just one wheel

Open ibudai opened this issue 14 years ago • 2 comments

Hi,

To reproduce the problem from the subject line:

  1. 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

ibudai avatar Mar 22 '12 11:03 ibudai

Fixed in v1.6

dioslaska avatar Mar 26 '12 14:03 dioslaska

Thanks for the fix, works fine with v1.6.

ibudai avatar Mar 27 '12 03:03 ibudai