primitives icon indicating copy to clipboard operation
primitives copied to clipboard

[Select] Fix touch devices bugs

Open vladmoroz opened this issue 1 year ago • 0 comments

  • Fix an issue when clicking a Select Item would click an element behind it on Android touch devices (https://github.com/radix-ui/primitives/issues/1658)
    • Reproducible in Chrome’s touch device simulator
  • Fix an issue when Select Trigger would open inadvertently on touch-based scroll (https://github.com/radix-ui/primitives/issues/1912)
    • Reproducible on iOS and in Chrome’s touch device simulator
  • Similarly to the above, but in an open menu, prevent touch-based scrolling over Select Items from yielding a weird half-working focus interactions, and change Select Items to active on "click" for touch devices instead

The dropdown menu and potentially a couple other primitives would need similar fixes up next (can be done separately)

Touch, before:

https://github.com/radix-ui/primitives/assets/8441036/238b0fc6-3b05-45fd-9e54-71011dcba752

Touch, after:

https://github.com/radix-ui/primitives/assets/8441036/678a8fd2-1e78-432f-b55c-f153f315f67b

Behaviour with mouse devices is preserved:

https://github.com/radix-ui/primitives/assets/8441036/8042f00d-5d7a-4609-9a8b-b784f08122a4

Tested on real devices as well

vladmoroz avatar Jun 06 '24 08:06 vladmoroz