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

y-scrollbar handle goes past track length #542

Closed
szmarczak opened this issue Jul 8, 2023 · 2 comments
Closed

y-scrollbar handle goes past track length #542

szmarczak opened this issue Jul 8, 2023 · 2 comments

Comments

@szmarczak
Copy link

szmarczak commented Jul 8, 2023

Describe the bug

image

To Reproduce

Use the example below and scroll all the way down.

Expected behavior

Should be inside the gray bar.

Examples

https://stackblitz.com/edit/vitejs-vite-gamrvo?file=src%2FApp.svelte

Environment

  • Used Operating System(s): Windows 11
  • Used Browser(s) (with version): Google Chrome 114.0.5735.199 (Official version) (64-bit) (cohort: Stable)
@KingSora
Copy link
Owner

KingSora commented Jul 9, 2023

Good day @szmarczak

Nice catch - after some time of checking my math I've concluded that this is happening because I'm using rounded values provides by the browser with its offsetHeight and offsetWidth values. Switchting them with their corresponding getBoundingClientRect() counterparts gets rid of this problem.

This fix will be in the next release which should be published soon. I'll inform you once its out.

@KingSora
Copy link
Owner

KingSora commented Jul 9, 2023

@szmarczak I've published overlayscrollbars v2.2.1 which should fix this issue! Here is the full changelog: https://github.com/KingSora/OverlayScrollbars/blob/master/packages/overlayscrollbars/CHANGELOG.md#221

In case the new release didn't fix your issue please don't hesitate to re-open or to create a new one.

@KingSora KingSora closed this as completed Jul 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants