Store PDF scroll position when the viewer unmounts (#29872)

GitOrigin-RevId: fc82c8db3d8cdf6a4857a4d2f3f62b181e40e067
This commit is contained in:
Alf Eaton
2025-11-26 09:05:32 +00:00
committed by Copybot
parent 2c00a7a3a4
commit e590543bc5
@@ -238,6 +238,7 @@ function PdfJsViewer({ url, pdfFile }: PdfJsViewerProps) {
window.clearTimeout(storePositionTimer)
}
storePosition.cancel()
setPosition(pdfJsWrapper.currentPosition)
}
}
}, [setPosition, pdfJsWrapper, initialised])