dollarshaveclub / stickybits

Stickybits is a lightweight alternative to `position: sticky` polyfills 🍬
https://github.com/yowainwright/stickybits
MIT License
2.19k stars 167 forks source link

Position: fixed set on a sticky element early if scrollEl is used #583

Closed sbadya closed 4 years ago

sbadya commented 4 years ago

Steps to reproduce:

  1. Open https://codepen.io/yowainwright/pen/EXzJeb
  2. Use force fixed ({useFixed: true})
DanielRuf commented 4 years ago

Hi @sbadya,

Can you clarify what the issue is?

sbadya commented 4 years ago

Hi. If you open link with the sample, set {useFixed: true} in stickybits options, then start to scroll element (scrollEl), position fixed on a sticky element set early before as sticky will be on a top scrollEl. As a workaround, please, review a PR - https://github.com/dollarshaveclub/stickybits/pull/585