tamagui / tamagui

Style React fast with 100% parity on React Native, an optional UI kit, and optimizing compiler.
https://tamagui.dev
MIT License
10.23k stars 415 forks source link

Select: web touch events on ListItem propagate when they should not #2615

Closed medv closed 1 month ago

medv commented 1 month ago

Current Behavior

When viewing on desktop it's fine, however on phone in desktop mode or on desktop with devtools set to mobile device mode, the press event on a list option propagates to what is behind it. This means you cannot pick an option that is over the Select that opened the options. picking an option that is over another Select on the same page selects that option and immediately opens the other Select. Typically I think Adapt Sheet obscures this problem, but it is there and it does affect users.

Expected Behavior

Press events not propagated, as with Click events currently

Tamagui Version

1.95.3

Platform (Web, iOS, Android)

Web touch

Reproduction

https://tamagui.dev/ui/select/1.40.0 

Open on mobile chrome and enable "desktop mode", use the list and observe it not close when picking an option that obscures the Select that opened it (press propagates and opens it before it has a chance to close?)

Open on desktop chrome and enable mobile device mode in devtools and repeat the above.

System Info

No response

ehxxn commented 1 month ago

this one should help https://github.com/tamagui/tamagui/issues/2220