tamagui: Dragable sheets don't allow interactions with sheet content
Current Behavior
It’s not possible to reliably interact with the sheet content when dragging is disabled. The touches need to be very precise and very short. No problem in the emulator but on a physical phone you are mostly out of luck.
https://github.com/user-attachments/assets/7e5adea8-9668-4b88-bf67-28cba5a7879e
Expected Behavior
Should be able to interact with buttons on the sheet even if draging is enabled.
Tamagui Version
1.126.4
Platform (Web, iOS, Android)
Pixel 8a Android 15
Reproduction
https://github.com/timonla/tamagui-sheet-interactions
System Info
System:
OS: Linux 6.8 Ubuntu 24.04.1 LTS 24.04.1 LTS (Noble Numbat)
CPU: (16) x64 12th Gen Intel(R) Core(TM) i5-1240P
Memory: 45.14 GB / 62.51 GB
Container: Yes
Shell: 5.2.21 - /bin/bash
Binaries:
Node: 22.14.0 - /usr/local/bin/node
Yarn: 4.5.0 - /usr/local/bin/yarn
npm: 10.9.2 - /usr/local/bin/npm
pnpm: 9.10.0 - ~/.local/share/pnpm/pnpm
Browsers:
Chromium: 135.0.7049.114
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 23 (16 by maintainers)
Can you test with the latest canary version?
I will take a look at it soon.
Hi @nnphong1904 , sorry to say this is not fully working even on the latest tamagui version 1.126.8. Please take a look at these recordings. I have a reproduction here: https://github.com/pkfms/tamagui-sheet-example/tree/main I’m using two snappoints in percent mode. Two examples, with and without using scrollview
The only way I can interact with buttons is without the scrollview and only when the sheet is at the top position. In other cases, any interaction still triggers the sheet drag gesture.
With ScrollView: https://github.com/user-attachments/assets/7f5d5eda-bc08-4e24-b263-86f355811a9f
Without ScrollView: https://github.com/user-attachments/assets/0db17070-f676-43a6-91c4-4911ff2dc702
This commit here is when the problems started: https://github.com/tamagui/tamagui/commit/36b49e1ecb13c0318738590fa201fe9f096740d2 Going back to a version before this commit, all variants are working.
The problem with the scrollview I have narrowed down to: onMoveShouldSetResponder={() => scrollable} settings this back to onMoveShouldSetResponder={() => false}, and the scroll view example is working again. there is still a comment above this line: “setting to false while onResponderMove is disabled”, indicating this should be false.
At first I was going to joke you should click it more…but then it actually closes? Same issues I’m experiencing and I just assumed it never would actually trigger.