Due to the way our HTML layout is set up, the scrollbar appears on an element several levels deeper rather than on the window itself, breaking the intended functionality. The scroll position is never restored because of the incorrect values in the savedPosition property.
We’d like the option to pass a custom function that calculates the top value based on another element's scrollTop in the HTML. We're open to other workarounds and are happy to submit a PR with the proposed solution as well.
What problem is this solving
Due to the way our HTML layout is set up, the scrollbar appears on an element several levels deeper rather than on the window itself, breaking the intended functionality. The scroll position is never restored because of the incorrect values in the
savedPosition
property.Proposed solution
We’d like the option to pass a custom function that calculates the top value based on another element's
scrollTop
in the HTML. We're open to other workarounds and are happy to submit a PR with the proposed solution as well.Describe alternatives you've considered
No response