chakra-ui / ark

Ark UI is a headless UI library with over 45+ components designed to build scalable Design Systems that works for a wide range of JS frameworks.
https://ark-ui.com
MIT License
3.84k stars 115 forks source link

Select Content loses position of Trigger on scroll #2156

Closed rtwayland closed 9 months ago

rtwayland commented 9 months ago

Description

When an opened Select is inside a scrollable container, the Trigger will scroll away from the Content rather than the Content sticking to the Trigger's position.

Link to Reproduction (or Detailed Explanation)

https://stackblitz.com/edit/stackblitz-starters-xw6ba1?file=src%2FApp.tsx,src%2FSelect.tsx

Steps to Reproduce

Open the Select. If you scroll within the main content, everything works as normal. However, if you scroll within the Select's parent container, you can see the Trigger scroll away from the Content.

Ark UI Version

2.0.1

Framework

Browser

Google Chrome

Additional Information

https://github.com/chakra-ui/ark/assets/18559892/c723d42b-34e0-4b1e-b2ed-20c8b66b63e0

https://github.com/chakra-ui/ark/assets/18559892/e25b5318-1745-4cd5-b670-e6cc6ad69420

segunadebayo commented 9 months ago

This has been fixed in Zag.js

A new version will be released soon. We’ll re-open if issue persists after upgrading.