-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Description
Describe the bug
A simple dropdown with submenu items seems to unexpectedly flicker when coming in from the side that ends up including the submenu content (i.e. by default, this happens coming in from the right, and coming in from the left when collisions are prevented and there is not enough space on the right).
There is a very narrow zone that seems to act as a hover area both for the submenu content and the submenu trigger, which ends up in states like shown in the below recording, where you are hovered over the submenu trigger but no submenu is shown.
I could not reproduce this with barebones Radix + default styling from their demo page.
Setting a larger sideOffset (like 10+) seems to fix this. I believe this is because the two elements no longer overlap.
CleanShot.2026-01-05.at.14.58.20.mp4
Affected component/components
Dropdown
How to reproduce
- Slowly enter a dropdown submenu trigger from the side its content will be anchored to
- Observe a flash/flicker
Codesandbox/StackBlitz link
See https://ui.shadcn.com/docs/components/dropdown-menu – the first demo on the page shows this issue. For the one from the screencap, see https://v0.app/chat/shadcn-ui-dropdown-no24ovKKHh8
Logs
System Info
Tested on macOS Tahoe in Firefox, Safari and Arc.Before submitting
- I've made research efforts and searched the documentation
- I've searched for existing issues