From 90dacec9e9e510da05f1c3ab54cb95fdd3e3dc47 Mon Sep 17 00:00:00 2001 From: emilkowalski Date: Fri, 22 Sep 2023 20:36:31 +0200 Subject: [PATCH] Fix modal prop --- src/index.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index 3469cb1..345ce20 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -668,6 +668,7 @@ const Content = React.forwardRef(function ( setVisible, closeDrawer, scaleBackground, + modal, } = useDrawerContext(); const composedRef = useComposedRefs(ref, drawerRef); @@ -688,6 +689,10 @@ const Content = React.forwardRef(function ( }} onPointerDown={onPress} onPointerDownOutside={(e) => { + if (!modal) { + e.preventDefault(); + return; + } if (keyboardIsOpen.current) { keyboardIsOpen.current = false; }