Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ensure interaction after closing #438

Merged
merged 2 commits into from
Sep 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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 parent
while (element) {
Expand Down
Loading