sticky-kit icon indicating copy to clipboard operation
sticky-kit copied to clipboard

Messed up positioning in 1.1.4

Open cdhannes opened this issue 8 years ago • 2 comments

I use this script on various sites and had trouble with phantom scrolling in chrome on all pages. I used the fix from #218 and updated to unofficial 1.1.4 but now the positioning gets messed up. I have a sticky navbar with a offset and a sticky sidebar below, but the navbar gets stuck too late and as a result the sidebar now partially disappears behind the navbar instead of sticking below. If I set recalc_every to 1, all works but the performance is bad, especially on mobile devices. Any higher value of recalc_every has a chance to not correctly position my navbar so that it disappears behind the header on the first scrollwheel move. I assume this happens because the tick() function now doesn't update documents height itself but gets a static value. I tried for hours to solve this but had no luck yet. Anyone able to help?

cdhannes avatar Jun 02 '17 14:06 cdhannes

short update: as soon as I set recalc_every, phantom scrolling is back...

cdhannes avatar Jun 02 '17 14:06 cdhannes

@cdhannes recalc_every: 10 It worked for me.

dimondevs avatar Oct 17 '17 19:10 dimondevs