ui
ui copied to clipboard
[bug]: base-ui select popover shifts on subsequent opens
Describe the bug
Overview
When opening the select popover, the position of the popover is shifted so it no longer aligns with the trigger.
Component: Select
Component Library: "Base UI"
Installation Command:
npx shadcn@latest create --preset "https://ui.shadcn.com/init?base=base&style=vega&baseColor=zinc&theme=zinc&iconLibrary=lucide&font=inter&menuAccent=subtle&menuColor=default&radius=default&template=vite" --template vite
Examples
Code example: https://github.com/joesanchezjr/shadcn-base-ui-select Deployed example: https://shadcn-base-ui-select-bug.netlify.app/
Screenshots
| Description | Screenshot |
|---|---|
| Initial opening of select popover - on the first click of the trigger, everything is aligned as expected. | |
| Subsequent opening of the select popover - on any click after the first, the popover is now not aligned to correctly to the trigger. | |
| Subsequent opening of the select popover - the alignment issue shows on any selected option, including the last one. | |
Disabling tw-animate-css - Disabling the animation library reduces the shift, but it does not fix it. (It is now shifted in a different direction |
Affected component/components
Select
How to reproduce
- Go to sandbox or deployment
- Click on Select
- See it work as expected
- Click out of Select
- Click on Select
- See it shifted
- Comment out
tw-animate-cssinindex.css - Repeat Steps 5 & 6
Codesandbox/StackBlitz link
https://codesandbox.io/p/github/joesanchezjr/shadcn-base-ui-select/main
Logs
System Info
MacOS Tahoe 26.1, Node 22.21.1, Chrome Version 143.0.7499.110
Before submitting
- [x] I've made research efforts and searched the documentation
- [x] I've searched for existing issues
hey, I'll fix it