Closed pachooca closed 7 years ago
Well, I just found the solution, as mentionned here: https://github.com/garand/sticky/issues/180
I commented this line:
//update height in case of dynamic content
s.stickyWrapper.css('height', s.stickyElement.outerHeight());
(around line 55 for the 1.0.4 version)
It seems to have a problem with the sticky-end call and the height recalculation of the div
I have the same problem, but it only happens when the div set to sticky is on top of the page.
I have a sticky menu with 3 items (menu btn, logo and custom button)
When I scroll down, I successfully have the sticky menu:
But I when I scroll back to top, the sticky-menu is "unsticked", but it looks like the sticky-wrapper height is still there:
The white space at the top (121px) is exactly the height of my sticky-menu,
And you see the result, as my content is pushed down.... :s
FWIW, my top content is a fullscreen carousel (so position:absolute) and the is absolute positioned too, over this carousel.
Any idea why this .sticky-wrapper height isn't reset to 0?