diff --git a/src/components/Modal/index.tsx b/src/components/Modal/index.tsx index 0eaf4622..5e6f930b 100644 --- a/src/components/Modal/index.tsx +++ b/src/components/Modal/index.tsx @@ -139,6 +139,18 @@ function Modal({ }; }, [resizeTrigger]); + useEffect(() => { + const removeClassName = () => { + if (!document.querySelector(".ReactModal__Content")) { + document.body.classList.remove("ReactModal__Body--open"); + } + }; + return () => { + removeClassName(); + setTimeout(removeClassName, MODAL_CLOSE_TIMEOUT_MS + 100); + }; + }, [isOpen]); + return (