Open
Description
Bug Report: Unresponsive Page After Dialog Unmounting
Description
When using a <Dialog>
component that contains an inner <DropdownMenu>
, clicking a menu item that triggers the dialog's content unmount causes the entire page to remain unresponsive. It appears that the CSS property pointer-events: none
persists even after the dialog is removed.
Steps to Reproduce
- Open the dialog.
- Open the dropdown menu inside the dialog.
- Click the menu item that executes a handler (e.g.,
handlerThatUnmountsDialog
) to unmount the dialog content. - Notice that, although the dialog content is unmounted, the rest of the page remains unclickable due to lingering
pointer-events: none
.
<Dialog>
<DialogContent>
<DropdownMenu>
<DropdownMenuTrigger />
<DropdownMenuContent>
<DropdownMenuItem
className="text-red-500"
onClick={handlerThatUnmountsDialog}
>
Menu item
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
</DialogContent>
</Dialog>
Expected Behavior
After the dialog content is unmounted, the page should return to its normal state with all pointer events re-enabled, ensuring that the page remains fully interactive.
Actual Behavior
The page remains unclickable after the dialog is unmounted because the pointer-events: none
property is not being removed.
Environment
Software | Name(s) | Version |
---|---|---|
Radix Packages | popover, dialog | 1.1.6 |
React | 18, 19 | |
Browser | Chrome | |
Operating System | macOS |
Additional Context
A minimal reproducible example is available for review here: V0 example.
Suggested Solution
No proposed solution at this time.
Metadata
Metadata
Assignees
Labels
No labels