From f2e3d6c81919fed88423220174deb588f12cd710 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sat, 22 Aug 2020 17:37:26 +0200 Subject: [PATCH] Don't warn when navigating away from a modified form, if printing has occurred (issue 12262) This solution is obviously *not* perfect, since printing being cancelled will thus remove the warning as well. However, a similar problem already exists for saving, since the user may cancel that one as well. All-in-all, since way cannot really detect with absolute certainty that either saving or printing actually finished, this seems good enough for now. --- web/app.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/app.js b/web/app.js index 949d1c4ad..9bbe26deb 100644 --- a/web/app.js +++ b/web/app.js @@ -1687,6 +1687,10 @@ const PDFViewerApplication = { if (this.printService) { this.printService.destroy(); this.printService = null; + + if (this.pdfDocument) { + this.pdfDocument.annotationStorage.resetModified(); + } } this.forceRendering(); },