Open blu94 opened 6 years ago
In my example it works well after reloading the page. Can you give me your config??
Hey just to reach out its doing the same here too with the jQuery version.
I'm experiencing the same issue.
Same issue I just stuck this after initializing it:
setTimeout(function () {
window.dispatchEvent(new Event('resize'));
}, 500)
I solved the issue by calling the updateSticky()
method right after initializing it.
@gsc89 solution also worked, but the 500ms timeout was visible on the page.
In my case it was incorrectly scrolled to top after I hit the back button in browser. So this works for me (in SPA)
window.onpopstate = function() {
setTimeout(() => {
window.dispatchEvent(new Event('resize'))
})
}
Sticky sidebar not moving after browser reload, but after i resize the window, the sticky sidebar work