KingSora / OverlayScrollbars

A javascript scrollbar plugin that hides the native scrollbars, provides custom styleable overlay scrollbars, and preserves the native functionality and feel.
https://kingsora.github.io/OverlayScrollbars
MIT License
3.71k stars 215 forks source link

Scrollbar hiding even while grabbing #597

Closed podrivo closed 7 months ago

podrivo commented 7 months ago

Describe the bug Scrollbar is hiding even if it's currently being pressed. It fades out, but it's still pressed. So if you move the mouse, it fades in. I'm using Nuxt 3 with overlayscrollbars (2.4.5) and overlayscrollbars-vue (0.5.6).

Also, cursor: grab and cursor: grabbing are not being applied, but not sure if it's intended this way.

To Reproduce See link: https://stackblitz.com/edit/nuxt-starter-tfsttj

Expected behavior With the option autoHide: 'scroll', I expected the scrollbar to hide in all situations, except when scrolling. But if you are pressing it, even if not scrolling, it should not fade out.

Thank you!

KingSora commented 7 months ago

Good day @podrivo

This seems to be a regression, since this was working before - I'll take a look and release a fix as soon as I have time :)

podrivo commented 7 months ago

Nice! Thank you so much! 🙌 For the cursors not being applied, I was able to achieve it by adding the following CSS:

.os-scrollbar-handle {
  cursor: grab;
}

[data-overlayscrollbars="host scrollbarPressed"] .os-scrollbar-handle {
  cursor: grabbing;
}
KingSora commented 7 months ago

@podrivo I've published v2.4.6 which should fix the issue :)

podrivo commented 7 months ago

Thank you so much @KingSora! 🙌 ✨