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: restore position setting on unmount #135 #136

Merged
merged 1 commit into from
Oct 4, 2023
Merged

fix: restore position setting on unmount #135 #136

merged 1 commit into from
Oct 4, 2023

Conversation

andrejilderda
Copy link
Contributor

This PR makes it so that the position is properly reset whenever the drawer is unmounted.

@emilkowalski You can use this page for testing (although you need to unset the overflow: hidden's on the body in globals.css).
page.txt

Fixes #135.

@vercel
Copy link

vercel bot commented Oct 4, 2023

@andrejilderda is attempting to deploy a commit to the emil Team on Vercel.

A member of the Team first needs to authorize it.

@emilkowalski
Copy link
Owner

Thank you!

@emilkowalski emilkowalski merged commit 888d27f into emilkowalski:main Oct 4, 2023
@bjcgg
Copy link

bjcgg commented Oct 9, 2023

When will this be released you think? @emilkowalski

@emilkowalski
Copy link
Owner

@bjcgg Just released a new version!

@bjcgg
Copy link

bjcgg commented Oct 9, 2023

@bjcgg Just released a new version!

Thanks a lot!

@andrejilderda
Copy link
Contributor Author

@emilkowalski 0.7.1 still seems to suffer from this issue. 🤔 Or is it just me? Here's the updated CodeSandbox with v.0.7.1: https://codesandbox.io/p/sandbox/body-scroll-lock-bug-on-unmount-v-0-7-1-cnxlvt?file=%2Fpackage.json%3A6%2C23

I'm wondering if the build succeeded, because when I try to pnpm run build it I get a:

src/index.tsx(788,14): error TS2742: The inferred type of 'Drawer' cannot be named without a reference to '.pnpm/@types+react@18.2.21/node_modules/@types/react'. This is likely not portable. A type annotation is necessary.

@andrejilderda
Copy link
Contributor Author

✅ This seems to be fixed in the latest release (0.7.5).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unmounting drawer does not unset position fixed on the <body>
3 participants