ion.rangeSlider
ion.rangeSlider copied to clipboard
When using drag_interval the onChange event is called twice on every move to the right.
When using drag_interval the onChange event is called twice on every move to the right.
Her's an example to demonstrate this issue: http://jsfiddle.net/y81j67qh/13/
If you drag the bar to right it always calls the onChange event 2x. First has the old from time, the second has both from and to times updated.
Another issue is that occasionally if you move the bar left slowly (by one step) it doesn't call the onChange on the first change. This is also reproducible in the above example.
Tested in Chrome 46.
Hello.
- Not sure that i manage to reproduce the bug. I think it depends on mouse accuracy and that's all.
- Yes, this bug i see.
Nether the less, i will review this callback mechanism and will try to make it more accurate. Tnx.
Hmm, interesting. I can reproduce p1 (dragging to right always triggers 2 events per mousemove) on 2 different PCs with different mouses (Windows 7, Chrome 46, Logitech MX Performance; Mac OS X, Safari 9, Magic Mouse)
Here are the logs when moving from 300-800 to 330-830.
Data changed: 300, 805 <-- this one should not have been called Data changed: 305, 805 Data changed: 305, 810 <-- this one should not have been called Data changed: 310, 810 Data changed: 310, 815 <-- this one should not have been called Data changed: 315, 815 Data changed: 315, 820 <-- this one should not have been called Data changed: 320, 820 Data changed: 320, 825 <-- this one should not have been called Data changed: 325, 825 Data changed: 325, 830 <-- this one should not have been called Data changed: 330, 830
Ok maybe. I will check it again more fixedly.
Hi Denis, is there any update on this issue?
I was able to fix this issue by changing the targets from "both" to "both_one" in bindEvents here: https://github.com/IonDen/ion.rangeSlider/blob/ef3c9fa8a73715eade068a97fad5ffb367b50ee2/js/ion.rangeSlider.js#L692-L693
Thank you for finding the issue, I will take a look on it.