inertia icon indicating copy to clipboard operation
inertia copied to clipboard

Restore scroll position inside setPage

Open ragulka opened this issue 3 years ago • 0 comments

This is a proposed fix for #1211

This change will ensure that whenever setPage is called, the preserveScroll option is respected. Since this option is always passed from current callers to setPage anyway, it should be safe to move the handling to setPage. This will centralize preserveScroll handling when using setPage. There are a few other instances where scroll needs to be restored, which does not involve calling setPage, and this PR does not affect them.

Alternatively, we could add a promise resolved handler here, and call restoreScrollPositions(), but it seems redundant.

ragulka avatar Jul 01 '22 12:07 ragulka