You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to open a Drawer from a popover. I want to close the popover when I open the drawer. Doing so programatically, with a controlled open prop on the popover, will also close the drawer. Undesired behaviour.
This issue arises not only with Popover but also when using third-party modals together.
Setting pointer-events: none on the body is an excellent solution for preventing body scrolling while the Dialog is open, but it causes other modals to malfunction.
To resolve this, the automatic closing behavior in onPointerDownOutside should be prevented with preventDefault, and pointer-events: auto should be applied to Popovers or third-party modals for proper functionality.
(Simply removing pointer-events: none from the body would leave the scrolling issue unresolved.)
Since this currently requires manual customization, it would be better if this were provided as an option or if a more user-friendly solution could be explored.
Bug report
Current Behavior
Expected behavior
When opening a popover over a modal window, the focus is moved to popover.
When clicking on Dialog.Content, the popover closes
When clicking on Dialog.Overlay, the popover and dialog close
Reproducible example
https://codesandbox.io/p/sandbox/radix-ui-dialog-forked-mgrzrd?workspaceId=a4b71791-adc5-4752-b50f-7be66d4db979
Suggested solution
Additional context
Your environment
The text was updated successfully, but these errors were encountered: