From 00aef590cf738bf4b4352efc7086c0cbb2ac97f8 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Tue, 13 Sep 2022 10:57:10 +0200 Subject: [PATCH] Disable the editing-indicator, in the document title, during printing (bug 1790552, PR 15351 follow-up) --- web/app.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/web/app.js b/web/app.js index 63a68ce0d..880cb43d8 100644 --- a/web/app.js +++ b/web/app.js @@ -797,7 +797,9 @@ const PDFViewerApplication = { // Embedded PDF viewers should not be changing their parent page's title. return; } - document.title = `${this._hasAnnotationEditors ? "* " : ""}${title}`; + const editorIndicator = + this._hasAnnotationEditors && !this.pdfRenderingQueue.printing; + document.title = `${editorIndicator ? "* " : ""}${title}`; }, get _docFilename() { @@ -1844,6 +1846,8 @@ const PDFViewerApplication = { ); this.printService = printService; this.forceRendering(); + // Disable the editor-indicator during printing (fixes bug 1790552). + this.setTitle(); printService.layout(); @@ -1874,6 +1878,8 @@ const PDFViewerApplication = { this.pdfDocument?.annotationStorage.resetModified(); } this.forceRendering(); + // Re-enable the editor-indicator after printing (fixes bug 1790552). + this.setTitle(); }, rotatePages(delta) {