Fix pager scroll restoration

This commit is contained in:
Dan Abramov
2023-12-22 02:52:23 +00:00
parent 79eadf5141
commit 72d01685b0
3 changed files with 30 additions and 16 deletions
+1 -4
View File
@@ -521,10 +521,7 @@ function RoutesContainer({children}: React.PropsWithChildren<{}>) {
// TODO: Clean up?
navigationRef.current?.addListener('__unsafe_action__', e => {
if (webFocusedScreen) {
webScrollPositions.set(
webFocusedScreen,
Math.round(window.scrollY),
)
webScrollPositions.set(webFocusedScreen, window.scrollY)
}
})
}