You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running into this issue where I'm unable to scroll when the drawer is unmounted without closing.
My use case is that the drawer is opened on a subroute inside a React Router <Outlet />. So if a user is navigating away from this route the drawer is unmounted and any onClose methods are not called, leaving the body scroll lock intact *see below.
Hi @emilkowalski,
Great work on this component!
I'm running into this issue where I'm unable to scroll when the drawer is unmounted without closing.
My use case is that the drawer is opened on a subroute inside a React Router
<Outlet />
. So if a user is navigating away from this route the drawer is unmounted and any onClose methods are not called,leaving the body scroll lock intact*see below.Reproduction:
https://codesandbox.io/p/sandbox/body-scroll-lock-bug-on-unmount-2hpk8k?file=%2Fapp%2Fmy-drawer.tsx%3A85%2C21
*Edit: I found that the scroll lock is properly unset, but it's the
usePositionFixed
-hook that isn't.The text was updated successfully, but these errors were encountered: