stickybits
stickybits copied to clipboard
Stickybits isn't adding padding to parent element when position is changed to fixed
Describe the bug when sticky bits is initiating it gets all the elements with the selector passed and calculated and sticky start and end portion for each one. so when having multiple sticky elements in the page and the first element is converted to a fixed position the document flow will change(the element is now out of document flow and the parent will shrink) this will affect the proceeding element sticky start position
To Reproduce Having any element use the sticky plugin and then scroll to make the element position fixed notice the parent element will shrink Expected behavior to emulate sticky positioning the element shouldn't be removed from the document flow I suggest adding padding to the parent element or adding an empty div with the same height Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context the main problem is that the sticky start position for the element will be broken and the user will have to scroll more distance for it to work
I want to get to this issue pretty fast! @Ibrahimrahhal would you by chance have the time to make your own PR with updates to this one?
Thanks!!! 🙏