From c253ee9ab8acb5729aefee3cd1638802ceea28c3 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Thu, 6 Jul 2017 13:44:01 +0200 Subject: [PATCH] Ensure that the document is rendered on load, no matter what happens, by always calling `PDFViewer.update` *after* the initial position has been set --- web/app.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/app.js b/web/app.js index 784aa1537..8eacd7126 100644 --- a/web/app.js +++ b/web/app.js @@ -985,6 +985,12 @@ let PDFViewerApplication = { pdfViewer.currentScaleValue = pdfViewer.currentScaleValue; this.setInitialView(initialParams.hash); + }).then(function() { + // At this point, rendering of the initial page(s) should always have + // started (and may even have completed). + // To prevent any future issues, e.g. the document being completely + // blank on load, always trigger rendering here. + pdfViewer.update(); }); });