Skip to content

Commit

Permalink
fix: using e.preventDefault to prevent drawer from closing (#237)
Browse files Browse the repository at this point in the history
  • Loading branch information
GrantClark1999 committed Jan 29, 2024
1 parent 85f6b45 commit 264c56e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ const Content = React.forwardRef<HTMLDivElement, ContentProps>(function (
onPointerDown={onPress}
onPointerDownOutside={(e) => {
onPointerDownOutside?.(e);
if (!modal) {
if (!modal || e.defaultPrevented) {
e.preventDefault();
return;
}
Expand Down

0 comments on commit 264c56e

Please sign in to comment.