Skip to content

Position shift on <DropdownMenu.SubContent> since bits-ui@2.15.8 #1978

@kyuuaria

Description

@kyuuaria

Describe the bug

A layout shift occurs on the <DropdownMenu.SubContent> component during onmouseleave events. When the cursor leaves the SubTrigger or the SubContent area, the submenu container momentarily jumps or recalculates its position coordinates for a brief flicker before the exit transition completes or the component unmounts.

Although this behavior surfaced following the release of bits-ui@2.15.8, it appears to be specific to the shadcn-svelte implementation. While the issue is present in shadcn-svelte projects, it is not reproducible in a standard bits-ui reproduction StackBlitz template using the same version.

Reproduction

https://stackblitz.com/edit/github-5bwd9wq1?file=src%2Froutes%2F%2Bpage.svelte

Logs

System Info

System:
    OS: Linux 6.6 Ubuntu 24.04.4 LTS 24.04.4 LTS (Noble Numbat)
    CPU: (16) x64 AMD Ryzen 7 7800X3D 8-Core Processor
    Memory: 14.51 GB / 15.18 GB
    Container: Yes
    Shell: 5.9 - /usr/bin/zsh
  Binaries:
    Node: 24.13.1 - /home/user/.local/share/pnpm/node
    npm: 11.8.0 - /home/user/.local/share/pnpm/npm
    pnpm: 10.30.0 - /home/user/.local/share/pnpm/pnpm

Severity

blocking an upgrade

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions