bootstrap-slider
bootstrap-slider copied to clipboard
Android scrolling is not responsive
(The example page can already demonstrate the issue, so no jsfiddle is included)
During my recent implementation, the slider works fine on iOS devices but on android devices (Android 8.0), the slider is not responsive that it cannot be dragged, only can be clicked to select a new value.
After my investigation I found that it is the move page checking (line 1593 to line 1600) that caused the issue. I have no idea why it will cause issue on Android nor how to fix that yet and I have commented out those lines to make it work at this moment.
The mentioned code snippet:
// Vertical Slider
if (this.options.orientation === 'vertical' && xDiff <= 5 && xDiff >= -5 && (yDiff >= 15 || yDiff <= -15)) {
this._mousedown(ev);
}
// Horizontal slider.
else if (yDiff <= 5 && yDiff >= -5 && (xDiff >= 15 || xDiff <= -15)) {
this._mousedown(ev);
}