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

Continues scrolling on mobile #262

Open
weaselpus opened this issue May 29, 2020 · 0 comments
Open

Continues scrolling on mobile #262

weaselpus opened this issue May 29, 2020 · 0 comments

Comments

@weaselpus
Copy link

Environment

  • Browser: Safari, Chrome on mobile
  • Version of smooth-scrollbar: 8.5.2

Issue Summary

Continues scrolling on mobile is stuck easily.

Current Behavior

When a user scrolls vertically and reaches the edge, the continues scrolling doesn't kick in when the user scrolls a tiny bit the x-axis too.
Which happens usually when user scrolls up and down with their thumb on mobile.

Expected Behavior

The scrollbar continues scrolling along the y-axis even when users don't scroll perfectly vertical on touch devices.

Steps to Reproduce

On mobile go to the demo page.
Disable "Overscroll-plugin" and enable "continues scrolling"
Test "continues scrolling" on the last picture.

Fix

Remove "x-axis checking" in scrollbar.ts by removing line

res = res && (destX === offset.x);

and
const destX = clamp(deltaX + offset.x, 0, limit.x);

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