-
Notifications
You must be signed in to change notification settings - Fork 486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Twitch when sticky el is taller than viewport #118
Comments
have the same problem, when init StickySidebar after page scrolling |
Any proposed solution to this? |
Coming back to this... seems like the problem is not the element being taller than the viewport but taller that it's containing element. That could be caused by broken floats in older projects or vertical margins on block elements inside the container etc... In that case the sticky-sidebar.js:315 is always falsy and enters an event loop of (becoming sticky -> repositioning the element -> recalculating -> stop being sticky -> recalculating (not having the secondary condition met) -> looping again. My explanation might be a bit messy, but its kinda hard to paint the picture without... well... painting a picture :P tl;dr: Make sure the sticky elements height does not exceed its container. |
I ran into this issue when having elements with top and bottom margins in my sidebar. The solution for me was to apply |
The inline height of the sticky div starts bouncing, usually by 6px.
The text was updated successfully, but these errors were encountered: