I was trying to perform snapTo to hide bottomsheet when header is tapped. I wasn't able to do so Android. However, it works on iOS.
It can be reproduced in this snack. (Took one of the snack from earlier issues)
Long press the "Profile" tab to show the bottom sheet.
https://snack.expo.io/@roshangm1/bottom-sheet
I would like to dig in more on this (doing it too). If you have any clue on what could be the possible reason for this behavior, please do let me know.
I took a look into this and seem to have found the cause. The problem is that after pressing on a Touchable in the header, panMasterState transitions to State.FAILED, but snaps only run if it's State.END.
This is a work around which avoids the problem https://github.com/james-macindoe/react-native-gesture-handler/commit/bae1632334cd53ed720380c8ddecdfc89b70dce0
I don't know much about gesture handlers so I'm not sure if this is the correct fix or just a hack. Any suggestions @osdnk?
This issue has been fixed after the merge of https://github.com/james-macindoe/react-native-gesture-handler/commit/bae1632334cd53ed720380c8ddecdfc89b70dce0 in react-native-gesture-handler. However, when using enabledInnerScrolling={false}, this issue exist. I will close this issue and create new issue for this.
@roshangm1 snapTo doesn't work with enabledInnerScrolling={false} as you stated. Where did you open the issue? This is a big problem :(
Still experiencing this problem with React native paper button
Most helpful comment
This issue has been fixed after the merge of https://github.com/james-macindoe/react-native-gesture-handler/commit/bae1632334cd53ed720380c8ddecdfc89b70dce0 in
react-native-gesture-handler. However, when usingenabledInnerScrolling={false}, this issue exist. I will close this issue and create new issue for this.