Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions packages/dialog/src/reach-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ const DialogInner = React.forwardRef(function DialogInner(
onKeyDown,
onMouseDown,
unstable_lockFocusAcrossFrames,
disableEventCapturing,
...props
},
forwardedRef
Expand Down Expand Up @@ -188,6 +189,7 @@ const DialogInner = React.forwardRef(function DialogInner(
? !dangerouslyBypassScrollLock
: isOpen
}
noIsolation={disableEventCapturing}
>
<Comp
{...props}
Expand Down Expand Up @@ -429,6 +431,16 @@ interface DialogProps {
* @deprecated
*/
unstable_lockFocusAcrossFrames?: boolean;

/**
* By default, when the dialog is open, outer events are captured (see
* `noIsolation` option in react-remove-scroll:
* https://github.com/theKashey/react-remove-scroll#usage). Event capturing
* is React friendly and unlikely be a problem. But if you are rendering
* inside a shadow DOM container, you may want to disable event capturing.
*
*/
disableEventCapturing?: boolean;
}

Dialog.displayName = "Dialog";
Expand Down