react-input-range
react-input-range copied to clipboard
fix-body-scroll-lock-compatibility
Hey, I use react-input-range in modal window togather with bodyScrollLock.
bodyScrollLock has event.stopPropagation(); in it's handleScroll method: https://github.com/willmcpo/body-scroll-lock/blob/master/src/bodyScrollLock.js#L136
handleScroll is being triggered by ontouchmove event. Since it has stopPropagation ontouchmove event of react-input-range is not being triggered (listeners are on document).
https://github.com/davidchin/react-input-range/blob/master/src/js/input-range/slider.jsx#L119
That's why it's not working with bodyScrollLock.
In this PR I added useCapture parameter for listeners to force capturing phase and stopPropagation for handlers which is being called when we're moving Slider only.