initial scroll position always 0 when using browser back button #630

hvbe opened this Issue Dec 19, 2016 · 0 comments


None yet

1 participant

hvbe commented Dec 19, 2016

i am using scrollmagic on a site which has some async components. basically a list of items with an on demand pagination. when clicking on an item the user will get a detail view of the item. i store both the scroll position and the html of the async items in the sessionStorage of the browser when the user unloads/leaves the list page. when using the browser back buttons i restore the loaded async items and the scroll position.

this all works fine except the restoration of the scroll position. i discovered that it works in chrome, but not in firefox and ie. safari makes a snapshot of the dom and restores it when going back (basically does what i did with js), so no issues there.

when i disabled the scrollmagic plugin on the page it works ... of course. so, to me this seems to be an issue with scrollmagic somehow overwriting the initial scroll position set by the browser/client ("scrollTop" always returns "0")? has anyone ever had an issue like this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment