react-swipeable-bottom-sheet icon indicating copy to clipboard operation
react-swipeable-bottom-sheet copied to clipboard

Scroll Bug on Controlled Component with Touch event

Open ashkanahrabi opened this issue 4 years ago • 3 comments

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?

ashkanahrabi avatar Dec 20 '20 08:12 ashkanahrabi

@manufont Any updates?

ashkanahrabi avatar Dec 26 '20 13:12 ashkanahrabi

Same issue here

teamhide avatar Mar 11 '21 10:03 teamhide

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}

mmdzov avatar Apr 28 '21 04:04 mmdzov