Reputation: 922
It is always added automatically when opening the menu.
overflow: hidden;
padding-right: 17px;
Is there a way around this?
I don't need to do much when opening the dropdown menu, I'm using nextjs , tailwindcss and headlessui
I just discovered that the same thing happens with Dialog...
please tell me how to do it, thank you
Upvotes: 2
Views: 267
Reputation: 11
As mentioned in the docs, you can avoid this behavior by adding modal={false}
prop to MenuItems. Like so:
<MenuItems modal={false}></MenuItems>
It will disable scroll locking, focus trapping, and making other elements inert.
Upvotes: 1