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

Unable to scroll if container isn't scrollable on mount #578

Closed
hlynurstef opened this issue Oct 19, 2023 · 4 comments
Closed

Unable to scroll if container isn't scrollable on mount #578

hlynurstef opened this issue Oct 19, 2023 · 4 comments
Labels

Comments

@hlynurstef
Copy link

hlynurstef commented Oct 19, 2023

Describe the bug
The content is sometimes not scrollable depending on the container height on mount or if the container height changes through resizing the browser window

To Reproduce
Reproduction demo:

https://codesandbox.io/p/sandbox/overlayscrollbars-react-example-forked-skjq7t?file=%2Fsrc%2FApp.tsx%3A10%2C39
https://skjq7t-5173.csb.app/

CleanShot.2023-10-19.at.15.33.45-converted.mp4
  1. Open the reproduction demo
  2. Resize the window smaller so that it overflows the container
  3. Reload the page
  4. See that it can be scrolled
  5. Resize your window so that the red box stops overflowing
  6. Resize the window back so that the red box overflows
  7. Notice the scroll doesn't work anymore
  8. See attached video for demonstration

Also try:

  1. Resizing the window so that the red box doesn't overflow
  2. Reload the page
  3. No scroll (expected)
  4. Resize the window so that the red box overflows
  5. No scroll (not expected)

Expected behavior
The scroll should appear if the window is resized causing overflow

Environment

  • Used Operating System(s): macOs 14.0
  • Used Browser(s) (with version): Chrome Version 118.0.5993.70 (Official Build) (arm64)
@KingSora
Copy link
Owner

@hlynurstef Thanks for the report! Thats a regression since v2.4.0.. I'll release a fix as quick as possible

@KingSora
Copy link
Owner

KingSora commented Oct 20, 2023

@hlynurstef This should be fixed in the newest version v2.4.3.

https://codesandbox.io/p/sandbox/overlayscrollbars-react-example-forked-w3vp49

@hlynurstef
Copy link
Author

@KingSora thanks for the quick fix!

@KingSora
Copy link
Owner

@hlynurstef you're welcome! :)

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

No branches or pull requests

2 participants