Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Navbar] Fix navbar hide on scroll behavior, add explicit hide offset #91

Merged
merged 2 commits into from
Oct 27, 2019

Conversation

luksurious
Copy link
Contributor

Closes #90

Basically, I changed the hideOnScroll behavior in such a way that the navbar is only hidden if a certain threshold is reached (i.e. scrollY is farther than the navbar element / sticky offset or configurable parameter hideOffset), and that the navbar is always reappearing if the scrolling is "at the top" even if the tolerance was not reached (taking same threshold as described above).

As a minor thing, I tried to make the options type safer by casting them according to the expected type.

This is a more opinionated change and I am happy to discuss implementation.
(I am using the current version, though, already in an ongoing web project of mine successfully.)

I put this on top of the working 0.10.x branch as otherwise I was not able to properly test it.

@VizuaaLOG VizuaaLOG merged commit 683cc16 into VizuaaLOG:0.10.x Oct 27, 2019
@VizuaaLOG
Copy link
Owner

Thank you for this! I agree with the types as well!

VizuaaLOG pushed a commit that referenced this pull request Oct 27, 2019
@luksurious luksurious deleted the navbar-hide-offset-0.10.x branch October 27, 2019 17:44
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants