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.78k stars 214 forks source link

Weird Double Tap Behaviour on Mobile IOS Devices #560

Closed jeremiaswijaya closed 11 months ago

jeremiaswijaya commented 11 months ago

Describe the bug When using iPhone (Chrome and Safari), clicking on <a> tag with href, inside the scroll bar wrapper, requires double tap

To Reproduce I've tried in Android and iPhone, and it worked on Android but not on the iPhone. The browser that I'm using is the latest version of Google Chrome (Android and iPhone) and Safari (on iPhone)

Expected behavior Clicking element once should trigger <a> tag

Examples Open this JS Fiddle on any IOS device (Safari / Chrome should do the work) https://jsfiddle.net/jeremiasrama/s5oapue4/show

Try using the steps in reproduce section to reproduce the problem.

https://github.com/KingSora/OverlayScrollbars/assets/80539853/a0e7298c-d85b-4ed0-b5b7-8ecd74fbf370

Notice that when the scrollbar appeared, it happened when I tap on the <a> element

Environment

Additional context Might related to https://css-tricks.com/annoying-mobile-double-tap-link-issue/

KingSora commented 11 months ago

@jeremiaswijaya Thanks for this issue!

I'll take a look as soon as I have time

KingSora commented 11 months ago

@jeremiaswijaya I believe I've fixed the issue. Please test it out yourself with this fiddle: https://jsfiddle.net/7oe6hruk/15/ and report back you findings :)

jeremiaswijaya commented 11 months ago

@KingSora Awesome, it's working perfectly 👌, thanks for the help! Will be waiting once it merged to the repo.

KingSora commented 11 months ago

I've published v2.3.1 where this issue should be fixed :)

Related: https://github.com/KingSora/OverlayScrollbars/issues/285