From de77251f23da9d9a034f817c9f57af8d29e46548 Mon Sep 17 00:00:00 2001 From: y-solb Date: Wed, 9 Apr 2025 20:54:01 +0900 Subject: [PATCH] fix: ensure modal={false} applies when using controlled open state --- src/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 3ed6755..a03637e 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -737,13 +737,13 @@ export function Root({ } React.useEffect(() => { - if (!modal) { + if (!modal && isOpen) { // Need to do this manually unfortunately window.requestAnimationFrame(() => { document.body.style.pointerEvents = 'auto'; }); } - }, [modal]); + }, [modal,isOpen]); return (