Skip to content

Commit

Permalink
Set closeOnFocus=false
Browse files Browse the repository at this point in the history
  • Loading branch information
michaldudak committed Jun 13, 2024
1 parent 97794d6 commit 6c9f081
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/mui-base/src/Dialog/Popup/DialogPopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const DialogPopup = React.forwardRef(function DialogPopup(
...other
} = props;
const rootContext = useDialogRootContext();
const { open, modal, nestedOpenDialogCount } = rootContext;
const { open, modal, nestedOpenDialogCount, dismissible } = rootContext;

const { getRootProps, floatingContext, mounted, transitionStatus } = useDialogPopup({
id: idProp,
Expand Down Expand Up @@ -68,7 +68,12 @@ const DialogPopup = React.forwardRef(function DialogPopup(

return (
<FloatingPortal root={container}>
<FloatingFocusManager context={floatingContext} modal={modal} disabled={!mounted}>
<FloatingFocusManager
context={floatingContext}
modal={modal}
disabled={!mounted}
closeOnFocusOut={dismissible}
>
{renderElement()}
</FloatingFocusManager>
</FloatingPortal>
Expand Down

0 comments on commit 6c9f081

Please sign in to comment.