<body style="pointer-events: none;">// from this page
<Dialog>
<DialogTrigger asChild>
<button type="button">
Tap Me, then Tap Me Again after dismissing the dialog
</button>
</DialogTrigger>
<DialogContent>
Now dismiss this dialog, then try tapping the earlier button again
</DialogContent>
</Dialog>
// from Dialog.jsx
export const DialogContent = React.forwardRef(({ children, ...props }, forwardedRef) => (
<DialogContentContainer {...props} ref={forwardedRef}>
<DialogHeaderBar>
<CloseButton aria-label="close" asChild>
<button type="button">
Dismiss
</button>
</CloseButton>
</DialogHeaderBar>
<DialogContentBody>
{children}
</DialogContentBody>
</DialogContentContainer>
))// from this page
<Dialog>
<DialogTrigger asChild>
<button type="button">
Here is a second button whose pointer event also gets eaten
</button>
</DialogTrigger>
<DialogPrimitive.Content style={{ /* ... */ }}>
<DialogPrimitive.Close asChild>
<button type="button">Dismiss</button>
</DialogPrimitive.Close>
Now dismiss this dialog, then try tapping the earlier button again
</DialogPrimitive.Content>
</Dialog> React.forwardRef styled version of the Dialog Content element with the DialogPrimitive.Content element directly