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

ClickScrollPlugin seems not support trackpad tap #650

Closed 1isten closed 4 weeks ago

1isten commented 1 month ago

Describe the bug clickScroll not working when using macbook trackpad

To Reproduce Steps to reproduce the behavior:

  1. registered plugin OverlayScrollbars.plugin(ClickScrollPlugin)
  2. enabled clickScroll config { scrollbars: clickScroll: true }
  3. click (press down) the macbook trackpad, scroll working fine
  4. tap (do not press down) the macbook trackpad, scroll not happening

Expected behavior tap on trackpad should behaved like press (click)

Environment

KingSora commented 1 month ago

Good day @1isten :)

I'm not a mac user so please help me to understand the issue. What is the actual difference between a tap and click? Currently the click scroll is written in a way where it is executed when the user clicks (and holds) the primary (left) mouse button on the scrollbar track.

Is a trackpad tap the same as a "left button mouse click"?

Edit: On my windows laptop tap as well as clicking the trackpad is working fine

1isten commented 1 month ago

Hi @KingSora , for MacBook trackpad we have two ways to trigger "click":

  1. The default way: put the finger on the trackpad and press down hardly, which means you can feel the touchpad being pressed and hear a sound, just like a left button mouse click.
  2. Tap (touch) the trackpad lightly without press down, just like a tap on mobile phone screen. Screenshot 2024-06-16 at 11 40 11 PM
1isten commented 1 month ago

Edit: On my windows laptop tap as well as clicking the trackpad is working fine

I suppose the macbook trackpad tap is the same as windows laptop tap, but the clickScroll just not working

KingSora commented 1 month ago

@1isten I'll see if I can get my hands on a mac computer in the next days to investigate this issue a bit more

KingSora commented 4 weeks ago

@1isten I've deployed a possibly fixed version to https://kingsora.github.io/OverlayScrollbars/ please try to click-scroll the body scrollbar with your trackpad tap.

1isten commented 4 weeks ago

@KingSora Thanks for your quick reply! I tried on an old MacBook (2015) with macOS 11, it works great now!

Will try on my new MacBook (which I encountered the issues originally) tomorrow, should be no problem ;D Thank you

1isten commented 4 weeks ago

@KingSora I just tried on my new MacBook (m2 chip with macOS 14) and it works too, thank you!

May I know when will you release new version with this fix?

KingSora commented 4 weeks ago

@1isten I've just released v2.9.0 which includes the fix :)