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

useStickyClasses option adds classes early #49

Open
santanajames opened this issue May 7, 2020 · 4 comments · May be fixed by #400
Open

useStickyClasses option adds classes early #49

santanajames opened this issue May 7, 2020 · 4 comments · May be fixed by #400

Comments

@santanajames
Copy link

santanajames commented May 7, 2020

Bug
When using sticky classes, they are triggered on .js-stickybit-parent rather than the top of the activated element itself. If there are elements within .js-stickybit-parent and above the activated element , the classes are added before the element becomes sticky. see the video link attached.

Steps to reproduce the behavior:

  1. set useStickyClasses: true
  2. add html to the element parent.
  3. Scroll down and notice the .js-is-sticky class is added when .js-stickybit-parent hits the top of the viewport rather than when the element becomes sticky.

Expected behavior
classes are added when the element becomes sticky

Bug Video
https://www.loom.com/share/9c6870eceaf147f29e5298945dae3f14

@github-actions
Copy link

github-actions bot commented May 7, 2020

Hey, thanks for filing an issue with Stickybits' first issue

@docccdev
Copy link

Hello. This problem is still actual, awaiting fix, thanks

@truongoi
Copy link

truongoi commented Sep 5, 2020

Experiencing the same issue. Is there any workaround method? Thanks.

@dalepgrant
Copy link

Have also run into this, haven't figured a workaround as yet

Kilbourne added a commit to Kilbourne/stickybits that referenced this issue Apr 28, 2022
Kilbourne added a commit to Kilbourne/stickybits that referenced this issue Apr 28, 2022
@Kilbourne Kilbourne linked a pull request Apr 28, 2022 that will close this issue
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 a pull request may close this issue.

4 participants