From 7364e84f3892cf5b427304a45779b1fe13544098 Mon Sep 17 00:00:00 2001 From: Emil Kowalski Date: Mon, 23 Sep 2024 02:01:39 +0200 Subject: [PATCH] Ensure pointer events are set to auto --- src/index.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index db9b68f..1c28700 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -111,6 +111,10 @@ export function Root({ document.body.style.pointerEvents = 'auto'; }); } + + if(!o) { + document.body.style.pointerEvents = 'auto'; + } }, }); const [hasBeenOpened, setHasBeenOpened] = React.useState(false); @@ -229,12 +233,12 @@ export function Root({ return false; } - // if (isDraggingInDirection) { - // lastTimeDragPrevented.current = date; + if (isDraggingInDirection) { + lastTimeDragPrevented.current = date; - // // We are dragging down so we should allow scrolling - // return false; - // } + // We are dragging down so we should allow scrolling + return false; + } // Keep climbing up the DOM tree as long as there's a parent while (element) {