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

Conversation

@Jonathan002
Copy link

@Jonathan002 Jonathan002 commented Apr 19, 2016

I was experiencing problems when resizing the window of my browser. The sticky element would always have the same width after resizing.

In order to fix this issue, I added some changes to the resizer function as once it assigned a fixed width to the stickyElement, every attempt to grab the element's width size would remain the same from the loops.

I had to also assign null to s.currentTop and call the scroller(); to bring the stickyElement back in view after resizing the widow. I hope someone can provide a more efficient solution though as I feel calling the scroller function over again is a bit heavy.

Hope this helps someone.

Issue Note: If you resize the window fast you can notice that the sticky element will be off position by a few pixels. Will post an update if I can find an issue to this problem.

I added some changes to the resizer function as once it assigned a fixed width, every attempt to grab the element's width size would remain the same from the loops.

I had to also assign null to s.currentTop and call the scroller(); to bring the stickyElement back in view after resizing the widow. I hope someone can provide a more efficient solution though as I feel calling the scroller function over again is a bit heavy.

Hope this helps someone.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant