ui icon indicating copy to clipboard operation
ui copied to clipboard

[bug]: base-ui select popover shifts on subsequent opens

Open joesanchezjr opened this issue 2 weeks ago • 1 comments

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. Image
Subsequent opening of the select popover - on any click after the first, the popover is now not aligned to correctly to the trigger. Image
Subsequent opening of the select popover - the alignment issue shows on any selected option, including the last one. Image
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 Image

Affected component/components

Select

How to reproduce

  1. Go to sandbox or deployment
  2. Click on Select
  3. See it work as expected
  4. Click out of Select
  5. Click on Select
  6. See it shifted
  7. Comment out tw-animate-css in index.css
  8. 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

joesanchezjr avatar Dec 13 '25 18:12 joesanchezjr

hey, I'll fix it

Hamed-Ajaj avatar Dec 13 '25 20:12 Hamed-Ajaj