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

scrollDirection reports wrong direction #350

Closed
intelligence opened this issue Dec 7, 2020 · 2 comments · Fixed by #360
Closed

scrollDirection reports wrong direction #350

intelligence opened this issue Dec 7, 2020 · 2 comments · Fixed by #360
Labels
enhancement New feature or request

Comments

@intelligence
Copy link

Great hook you've put together, been using it for a while and it works like a treat!

I've discovered what I think is a bug. On the project I'm working on right now I have a navigation that jumps to different sections on the homepage. I've noticed that if I jump to a section (via scrollTop) and then scroll upwards, when onEnter triggers scrollDirection.vertical is up, when it should be down.

If I test with onChange I see up on the first threshold and the following ones will be down as expected.

I'm just getting ready to launch this project so I'll revisit this thread with a test case as soon as I have the time if you can't reproduce on your own.

Thanks again!

@wellyshen
Copy link
Owner

@intelligence Sorry for the late. It's a good case that I didn't expect before. I'll reproduce and handle this issue soon.

@wellyshen wellyshen added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Dec 9, 2020
@wellyshen
Copy link
Owner

wellyshen commented Dec 10, 2020

@intelligence You can fix this issue via the new updatePosition API which is available in the latest version.

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

Successfully merging a pull request may close this issue.

2 participants