Closed Alhubing closed 5 years ago
It was implemented this way intentionally, if I remember correctly it will switch the handles around when it makes sense to do so.
The handles don't change until there is a difference of more than one unit.
[1,0] -> [0,0] => [1,0] => [0,2]
The correct behaviour would be
[1,0] -> [0,0] => [0,1] => [0,2]
If you give different colours to each handle you can see how the min handle goes over the max handle and they don't switch.
Thanks.
Please, could you give a hint about this? Thank you.
I was able to reproduce the bug. Check this JSFiddle https://jsfiddle.net/9L65wxa3/
Range starts at [5, 7]
To reproduce:
I have a fix which is a single line of code. I just need to add unit test for it.
Hello, i've noticed that if you create a range slider, step value set at 1, you can drag the min handle over the max handle for 1 step.
There you have the example.
http://jsfiddle.net/95chpj1d/13/
Yo have to drag the min handle, and when the min value gets to the max value, it can go 1 unit over the max.
You can check it in the console. At some point you can get an output like [0, 1] -> [1, 1] -> [2 ,1]
You can get the same behaviour if you drag the max handle over the min handle.
Thanks.