ui: Bug(DropdownMenu): Margin shift when opening dropdown menu
When I open DropdownMenu, a weird shift is triggered. However, when I close it, it disappears.
When it’s closed:
When it’s opened:
I have no idea what could cause this.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 16
I’m having the same issue. Setting
modal=falseto the dropdown menu component fixes the issue for me.modal={false}fixes it.Thanks a lots
So this is indeed still an issue. Maybe relevant that my navbar is using Tailwind’s fixed and top left right set to 0.
modal={false} also confirmed to fix. Maybe some conflict with fixed elements? I imagine OP’s navbar may have been fixed as well.
Video attached if possible.
https://github.com/user-attachments/assets/b7de0cba-e0b9-4e97-9b77-73b1b60d76c5
Recommend reopening issue.
Using chadcn-svelte I did the following to make it work:
DropdownMenu.Root preventScroll={false}