Skip to content

Commit

Permalink
fix: undismissable modal still can be closed with escape key
Browse files Browse the repository at this point in the history
  • Loading branch information
snymnd authored and ppdbultimate committed May 20, 2024
1 parent 718602d commit df8cb5a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/ui/src/components/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const ModalContent = React.forwardRef<
'flex flex-col gap-4 sm:gap-6 p-4 sm:p-6',
className,
])}
onEscapeKeyDown={(e) => !dismissible && e.preventDefault()}
onPointerDownOutside={(e) => !dismissible && e.preventDefault()}
ref={ref}
{...props}
Expand Down

0 comments on commit df8cb5a

Please sign in to comment.