Store PDF scroll position when the viewer unmounts (#29872)
GitOrigin-RevId: fc82c8db3d8cdf6a4857a4d2f3f62b181e40e067
This commit is contained in:
@@ -238,6 +238,7 @@ function PdfJsViewer({ url, pdfFile }: PdfJsViewerProps) {
|
||||
window.clearTimeout(storePositionTimer)
|
||||
}
|
||||
storePosition.cancel()
|
||||
setPosition(pdfJsWrapper.currentPosition)
|
||||
}
|
||||
}
|
||||
}, [setPosition, pdfJsWrapper, initialised])
|
||||
|
||||
Reference in New Issue
Block a user