Merge pull request #15325 from Snuffleupagus/issue-15324

Ignoring "resize" events during printing (issue 15324)
This commit is contained in:
Jonas Jenwald 2022-08-16 14:41:36 +02:00 committed by GitHub
commit b05010c3eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2514,7 +2514,12 @@ function webViewerSpreadModeChanged(evt) {
} }
function webViewerResize() { function webViewerResize() {
const { pdfDocument, pdfViewer } = PDFViewerApplication; const { pdfDocument, pdfViewer, pdfRenderingQueue } = PDFViewerApplication;
if (pdfRenderingQueue.printing && window.matchMedia("print").matches) {
// Work-around issue 15324 by ignoring "resize" events during printing.
return;
}
pdfViewer.updateContainerHeightCss(); pdfViewer.updateContainerHeightCss();
if (!pdfDocument) { if (!pdfDocument) {