captivationsoftware/react-sticky

Added div's padding not staying at calculated height

Closed this issue · 2 comments

At the top of the page the extra div's padding-bottom (added by Sticky) value is 0px. As I scroll and it touches the point at which I have Sticky set to stick at it changes momentarily to the calculated height of the menu (in my case 79px) but then immediately back to 0px causing the content below to jump up giving a janky feel. Any suggestions on how I can fix this?

vcarl commented

Hello! Would you be able to set up a codesandbox.io or codepen.io reproducing it?

It seems I have fixed the issue now, thanks anyway!