tamagui: Select Not Working on Android
Current Behavior
Select input does not open or display any values to select. It also does not display the selected value, (if a default is placed) or placeholder
https://github.com/user-attachments/assets/4a6fe183-94fd-479a-b993-0e3193a7ad77
Expected Behavior
When a select input is tapped, a sheet pops up with values to select
Tamagui Version
1.126.8
Platform (Web, iOS, Android)
Android
Reproduction
https://github.com/ThukuWakogi/select
System Info
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 28 (14 by maintainers)
I have the exact same issue. Upgraded from Tamagui
1.95.1to1.126.14and this is broken on a Samsung A52s.It works fine on my Xiaomi Redmi Note 7, it works fine in my emulators, it works fine on my iOS devices, it’s NOT working on some Android devices.
It seems I need to spam click a
Select.Itemto register it.When removing the
Sheet.ScrollView, the issue is still not fixed (but requires a lot less “spam” clicks to register).I have the same problem and had to change
Sheet.ScrollViewtoScrollViewto fix it. The problem is that if I open the popup, scroll a bit, close the popup and then open it back up - it remains scrolled instead of starting from the top again. So I believeSheet.ScrollViewneeds to be fixed.The issue was really hard to track, I found this posting only after I struggled for several hours and found the solution. This issue can only be replicated on a physical Android device, on the emulator it works properly.
@ThukuWakogi confirmed! The hitbox is
1x1pretty hard to catch 😬https://github.com/user-attachments/assets/8a8bba02-6776-4302-a16a-a91895ca3226
I thought the issue was related to the recent
lucide-iconschanges, but it’s not the case. We have the same behavior with plain text.tested on:
Thank you @nikenvy Changing
Sheet.ScrollViewtoScrollViewworks for me. @flexbox on my end the selecting is predictable, I don’t have to tap multiple times for an item to be selected.from my perspective, the root cause is android because it works like a charm on iOS 😅
Issue recap (on real device, android 14 and 15):
Selectopens a bottom sheetSelect.Itemto get the value does not select it EXCEPT on the top right corner, there is a 1pixel hitbox where it works. see videoWhen we get rid of
Sheet.ScrollViewon theAdapt>Sheet, we get back the expected result, but it’s not perfect. I suspect the event is not propagated somehow.I don’t think it’s related to
Select.ItemIndicatororCheckicon, with my test I replaced everything with a plainText.reproductible example
@nnphong1904 let me know if you need more context on this, happy to help to solve this
@ThukuWakogi there is definitely something wrong here.
I tried on a real device (Samsung S21) and i have a problem with
Select:SheetOverlayclose ithttps://github.com/user-attachments/assets/56f0baf5-599e-4d10-a916-429adb349fb8