From fce31c3f8360da726206602d0823aeedf39245ab Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sat, 29 Jul 2017 11:36:45 +0200 Subject: [PATCH] Ensure that the loadingBar isn't displayed again when the entire file has already been fetched This could only (potentially) happen when `disableAutoFetch` is used. --- web/app.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/app.js b/web/app.js index 7c7ee1fdf..0b4f0cd4a 100644 --- a/web/app.js +++ b/web/app.js @@ -846,6 +846,11 @@ let PDFViewerApplication = { }, progress(level) { + if (this.downloadComplete) { + // Don't accidentally show the loading bar again when the entire file has + // already been fetched (only an issue when disableAutoFetch is enabled). + return; + } let percent = Math.round(level * 100); // When we transition from full request to range requests, it's possible // that we discard some of the loaded data. This can cause the loading