react-swipeable-bottom-sheet
react-swipeable-bottom-sheet copied to clipboard
Scroll Bug on Controlled Component with Touch event
Hi there,
I just set the open={isOpen}
to use the controlled component, but when it's true and the body content is scrollable, swiping up causes a jump on scroll.
This issue occurs only when I swipe up with touch event.
Any ideas?
@manufont Any updates?
Same issue here
I had the same problem yesterday, I took the time today to check and see that line 80 of the SwipeableBottomSheet.js file has a problem
if (overflowHeight === 0) {
this.bodyElt.scrollTop = 0;
}
So I concluded that instead of setting overflowHeight to 0, I set it to 1
You can do this to solve your problem, but you must make the following condition for it to work properly:
overflowHeight = {! open? 0: 1}