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

Three bug fixes #173

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Three bug fixes #173

wants to merge 8 commits into from

Conversation

rseigel
Copy link

@rseigel rseigel commented Dec 30, 2016

Hi!

Thanks for the great work with this package. We are using it in our product but encountered three bugs (see below) that needed to be fixed. I've seen some open issues related to these bugs, so I think others are encountering them as well. I hope this PR is suitable and can help other users of your package.

Fixed bugs:

  1. unsticky-class only applied after an element goes from sticky to unsticky. I was debating whether this is intended functionality, but I couldn't come up with a valid use case. A fix is in place that applies unsticky-class on initialization, but is overridden if the element is sticky.
  2. while sticky, the element does is not responsive. A simple fix is in place that follows the same pattern used for unStickElement().
  3. A sticky element is not properly 'unstuck' when the the closestLine is opposite of the scrollFrom direction. For example, with a fast scroll downward (i.e. scrollFrom 'top') while the closestLine is 'bottom', the sticky element never unsticks. I implemented a fix for this that seems to be working well, however it was a more substantial tweak. I have not created any unit tests around this, but some should be created to always validate this fixed behavior.

Let me know if you have any questions.

Thanks,
Rob

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

Successfully merging this pull request may close these issues.

1 participant