sticky-js
sticky-js copied to clipboard
Can't prevent destruction on short screens
When the content is too tall for the screen, the sticky destroys itself.
This makes sense as the default behavior because otherwise the content would get cut off at the bottom of the screen and be inaccessible.
There is another way of avoiding this though.
.sticky {
max-height: 100vh;
overflow: auto;
}
This means that when the screen is too short to fit the content the content in the sticky container will become scroll-able.
My issue is that sticky-js will destroy itself when the screen gets too short even though there is no risk of the content getting cut off.
If there were a setting that allowed you to disable the self-destruction when the screen height is too short, that would fix the issue.