zillow / react-slider

Accessible, CSS agnostic, slider component for React.
https://zillow.github.io/react-slider
MIT License
892 stars 231 forks source link

Buggy display on IOS when placed in scrollable component #137

Closed YoavHortman closed 5 years ago

YoavHortman commented 6 years ago

When using the component in a scrollable component in an ios cordova app touching a slider will not prevent the default scroll behaviour and will start to glitch and display in a corrupted way.

Maybe prevent default on touch so that wouldn't happen?

YoavHortman commented 6 years ago

Was able to solve this using the following work around:

<ReactSlider
onBeforeChange={this.disableScroll}
onAfterChange={this.enableScroll}
/>

disableScroll = () => {
        document.ontouchmove = (e) => {
            e.preventDefault();
        }
    }
    enableScroll = () => {
        document.ontouchmove = () => {
            return true;
        }
    }

but still it seems like this should be default behavior

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.