Skip to content

Conversation

AntOlenin
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant