From af8df207bb04687b746833c93cb71342362a4d66 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Thu, 1 Jun 2023 17:44:14 +0200 Subject: [PATCH] Don't dispatch "pagerendered"-events on the *temporary* CSS-only zooming done when `drawingDelay` is used (PR 15812 follow-up) We shouldn't dispatch a "pagerendered"-event when doing *temporary* CSS-only zooming, but simply wait until the actual rendering is done. While I don't believe that this regression has caused any actual bugs, dispatching *duplicate* events is nonetheless inconsistent and should be fixed. --- web/pdf_page_view.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/pdf_page_view.js b/web/pdf_page_view.js index 234f71ba8..47d6c39d7 100644 --- a/web/pdf_page_view.js +++ b/web/pdf_page_view.js @@ -616,6 +616,11 @@ class PDFPageView { hideTextLayer: postponeDrawing, }); + if (postponeDrawing) { + // The "pagerendered"-event will be dispatched once the actual + // rendering is done, hence don't dispatch it here as well. + return; + } this.eventBus.dispatch("pagerendered", { source: this, pageNumber: this.id,