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

Multiple rebounds when using mouse wheel with inertia #9

Open
capi1O opened this issue Apr 18, 2020 · 1 comment
Open

Multiple rebounds when using mouse wheel with inertia #9

capi1O opened this issue Apr 18, 2020 · 1 comment

Comments

@capi1O
Copy link

capi1O commented Apr 18, 2020

First thank your work, I use it as a React wrapper as described in the doc and it worked right out of the box, simply brilliant...

I have one small issue however, I have a mouse Logitech MX Master which has some kind of inertia on the wheel, that is if you scroll fast it will keep scrolling on its own for a bit (physically, that is the wheel is still turning.

In this case I see multiple rebounds when reaching the bottom of the scrollable element, typically 3.

Interestingly this only happens when scrolling to bottom, no extra rebounds on top (while the wheel is still turning).

@atomiks
Copy link
Owner

atomiks commented Apr 18, 2020

// Prevent a bounce if already at the edge
if (innerWrap.style.transform !== 'translate3d(0px, 0px, 0px)') {
innerWrap.style.transition = 'none'
innerWrap.style.transform = RESET_TRANSFORM
}

Maybe something here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants