diff --git a/web/app.js b/web/app.js index 001fd50e3..c3d66871c 100644 --- a/web/app.js +++ b/web/app.js @@ -2469,7 +2469,10 @@ function webViewerUpdateViewarea({ location }) { } function webViewerScrollModeChanged(evt) { - if (PDFViewerApplication.isInitialViewSet) { + if ( + PDFViewerApplication.isInitialViewSet && + !PDFViewerApplication.pdfViewer.isInPresentationMode + ) { // Only update the storage when the document has been loaded *and* rendered. PDFViewerApplication.store?.set("scrollMode", evt.mode).catch(() => { // Unable to write to storage. @@ -2478,7 +2481,10 @@ function webViewerScrollModeChanged(evt) { } function webViewerSpreadModeChanged(evt) { - if (PDFViewerApplication.isInitialViewSet) { + if ( + PDFViewerApplication.isInitialViewSet && + !PDFViewerApplication.pdfViewer.isInPresentationMode + ) { // Only update the storage when the document has been loaded *and* rendered. PDFViewerApplication.store?.set("spreadMode", evt.mode).catch(() => { // Unable to write to storage.