A drawer component for React.
fix: ensure interaction after closing (#438)
Emil Kowalskiab988a580521
diff --git a/src/index.tsx b/src/index.tsxindex db9b68f..be4fbc1 100644--- a/src/index.tsx+++ b/src/index.tsx@@ -111,6 +111,11 @@ export function Root({document.body.style.pointerEvents = 'auto';});}++ if (!o) {+ // This will be removed when the exit animation ends (`500ms`)+ document.body.style.pointerEvents = 'auto';+ }},});const [hasBeenOpened, setHasBeenOpened] = React.useState<boolean>(false);@@ -229,12 +234,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 parentwhile (element) {