stickybits icon indicating copy to clipboard operation
stickybits copied to clipboard

useStickyClasses option adds classes early

Open santanajames opened this issue 4 years ago • 4 comments

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

santanajames avatar May 07 '20 00:05 santanajames

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

github-actions[bot] avatar May 07 '20 01:05 github-actions[bot]

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

docccdev avatar Jul 28 '20 08:07 docccdev

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

truongoi avatar Sep 05 '20 21:09 truongoi

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

dalepgrant avatar Jul 27 '21 03:07 dalepgrant