ui icon indicating copy to clipboard operation
ui copied to clipboard

Bug(DropdownMenu): Margin shift when opening dropdown menu

Open JigolKa opened this issue 7 months ago • 5 comments

When I open DropdownMenu, a weird shift is triggered. However, when I close it, it disappears.

When it's closed: Screenshot 2023-12-29 191515 When it's opened: Screenshot 2023-12-29 191527

I have no idea what could cause this.

JigolKa avatar Dec 29 '23 18:12 JigolKa

Can you please provide a little bit context? @JigolKa

mukul-7661 avatar Dec 29 '23 18:12 mukul-7661

At the top of my page, I have a header which looks like this: Screenshot 2023-12-29 201821 and the avatar at the right is a dropdown menu (just like the dashboard example). But when I open this dropdown, the whole page moves to the left, I don't know why: Screenshot 2023-12-29 202100 And when I close it, everything is like the first screenshot

JigolKa avatar Dec 29 '23 19:12 JigolKa

Basically the scroll bar disappears when dropdown is clicked, that's why the shift is there.

mukul-7661 avatar Dec 29 '23 20:12 mukul-7661

I'm having the same issue. Setting modal=false to the dropdown menu component fixes the issue for me.

<DropdownMenu modal={false}>
   ...
</DropdownMenu>

jianyuan avatar Dec 31 '23 18:12 jianyuan

I'm having the same issue. Setting modal=false to the dropdown menu component fixes the issue for me.

<DropdownMenu modal={false}>
   ...
</DropdownMenu>

Thanks a lots

kristoff2016 avatar Jan 12 '24 03:01 kristoff2016

This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.

shadcn avatar Feb 26 '24 23:02 shadcn

modal={false} fixes it.

thebiltheory avatar Apr 27 '24 16:04 thebiltheory