IonDen / ion.rangeSlider

jQuery only range slider
http://ionden.com/a/plugins/ion.rangeSlider/en.html
MIT License
2.55k stars 508 forks source link

Slider stuck at Max if from, to and intervals are declared #501

Closed Singleshutter closed 4 years ago

Singleshutter commented 7 years ago

If the Ion Range Slider has custom Interval values, and then initialize the 'from' and 'to' values, the slider gets bugged and slider point will be stuck at Maximum.

I was able to replicate the bug on jsfiddle, check it out here: http://jsfiddle.net/mad2vdyw/4/

IonDen commented 7 years ago

Hey, just checked your demo. No bug was found. I was able to drag the handle.

aharith commented 6 years ago

i have this exact same problem. I use type: double, custom interval value and both slider started at max. It's not stuck, its draggable but its wrong. i specified the from and to value but both slider still start at max value.

IonDen commented 6 years ago

@aharith, hi, could you show me your setup? Use this demo: http://jsfiddle.net/IonDen/726L0aj5/

aharith commented 6 years ago

Hi, sorry for the late reply. here you go. http://jsfiddle.net/726L0aj5/20/

update: sorry. typo in last fiddle. use this one http://jsfiddle.net/726L0aj5/21/

IonDen commented 6 years ago

@aharith, still cant reproduce. I can move handle.

SlavaJan commented 6 years ago

Hey, @IonDen! Let me bump this issue up. Look the problem in the fiddle by @aharith is that he explicitly declared from=1000 and to=200000 values but on page load both handles start at the maximum position of 300000. Of course you can move them, but the problem is that I want them to be at the exact positions provided in from and to right after the page is loaded. Such behavior only happens with custom values array.

IonDen commented 6 years ago

@SlavaJan, hi. In case of custom values array you should use array indexes in from and to fields instead of actual values. That is the correct workaround.

SlavaJan commented 6 years ago

Thank you! Using indexes worked for me.