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

"overflow: hidden" is not removed from <body> after <Drawer> closes #639

Closed
Amir-Zouerami opened this issue Oct 13, 2021 · 2 comments
Closed
Assignees
Labels
🔒 Overtime Expired, can be opened when there is an update type: bug Something isn't working

Comments

@Amir-Zouerami
Copy link

Amir-Zouerami commented Oct 13, 2021

Bug report 🐞

Version & Environment

  • Chrome 94 & Firefox 93
  • "@geist-ui/react": "^2.2.0",
  • I am using Next JS but I don't think that is of any relevance.

Expected Behaviour

If I click on a link inside the <Drawer> component, I'll go to another page. Before going to another page the overflow: hidden should be automatically removed from <body> but this does not happen.

Actual results (or Errors)

Because the overflow: hidden persists on the body, the content on the next page is not scrollable and the entire app is now without scroll ability. For me, the content on the next page is stuck outside of the viewport:

Geist-Drawer.mp4

It is also causing the infamous update state after unmounting (memory leak) error for me:

react_devtools_backend.js:2526 Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function.
    at http://localhost:3000/_next/static/chunks/pages/_app.js?ts=1634214302053:9364:23
    at DrawerComponent (http://localhost:3000/_next/static/chunks/pages/_app.js?ts=1634214302053:3790:28)
    at http://localhost:3000/_next/static/chunks/pages/_app.js?ts=1634214302053:14348:25
    at div
    at Navigation (http://localhost:3000/_next/static/chunks/pages/index.js?ts=1634214302053:16869:66)
    at div
    at GlobalContainer (http://localhost:3000/_next/static/chunks/pages/index.js?ts=1634214302053:16292:23)
    at Home

This is the main problem (memory leak). As soon as I use the visible props on the drawer, I get this error changing pages.

@unix
Copy link
Member

unix commented Jan 11, 2022

It is possible that you did not synchronize the state of the Drawer before the component unmounted, causing the component to remain updated after it unmounted, and this issue may be related to your code.
To trace the cause of this problem, you need to provide online code or examples. @Amir-Zouerami

@unix unix added the type: bug Something isn't working label Jan 11, 2022
@unix unix self-assigned this Jan 11, 2022
@unix unix added the 🔒 Overtime Expired, can be opened when there is an update label Jan 30, 2022
@unix
Copy link
Member

unix commented Jan 30, 2022

This issue has been closed for a long time without activity, please reopen it if there is an update.

@unix unix closed this as completed Jan 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔒 Overtime Expired, can be opened when there is an update type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants