Skip to content

useStickyClasses option adds classes early #49

@santanajames

Description

@santanajames

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions