seiyria / bootstrap-slider

A slider control for Bootstrap 3 & 4.
http://seiyria.github.io/bootstrap-slider/
Other
2.99k stars 1.14k forks source link

Android scrolling is not responsive #807

Open kenime opened 6 years ago

kenime commented 6 years ago

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

kenime commented 6 years ago

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);
    }