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

upTolerance not working #172

Open
MikeCarbone opened this issue Jan 17, 2020 · 4 comments
Open

upTolerance not working #172

MikeCarbone opened this issue Jan 17, 2020 · 4 comments

Comments

@MikeCarbone
Copy link

I have a component:

<Headroom upTolerance={100}>
  <h1>Header</h1>
</Headroom>

The header does not come down after scrolling up 100px as expected. Instead, it remains hidden until the top of the page is reached.

@markatli
Copy link

I'm wondering about the same thing. Any update?

@MikeCarbone
Copy link
Author

@markatli No update/solution from me, unfortunately. Ended up omitting that prop.

@paddibr
Copy link

paddibr commented May 27, 2020

same problem.

@janczizikow
Copy link
Collaborator

janczizikow commented Oct 23, 2020

The reason why this is not working is that there are multiple events emitted during the scroll; and it's very unlikely that the user could scroll so fast that there would be an event with 100px scroll distance. It's the same case in the original vanilla js headroom lib: https://wicky.nillia.ms/headroom.js/playroom/. Just open the playground and change the tolerance to 100 - it also won't work for the same reason mentioned above.

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

4 participants