Skip to content
This repository has been archived by the owner on Jan 11, 2022. It is now read-only.

Can't prevent destruction on short screens #56

Open
Dan503 opened this issue May 14, 2019 · 0 comments
Open

Can't prevent destruction on short screens #56

Dan503 opened this issue May 14, 2019 · 0 comments

Comments

@Dan503
Copy link

Dan503 commented May 14, 2019

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant