From b1161cee7cb0599c64fd85528d74e664329a4286 Mon Sep 17 00:00:00 2001 From: pacien Date: Mon, 23 Oct 2023 23:40:53 +0200 Subject: startscreen: lock UI until all scripts are loaded and ready --- beamer/viewer/viewer.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'beamer/viewer') diff --git a/beamer/viewer/viewer.js b/beamer/viewer/viewer.js index e9c6d65..a614c88 100644 --- a/beamer/viewer/viewer.js +++ b/beamer/viewer/viewer.js @@ -26,9 +26,14 @@ class Viewer { this.fileReader = new FileReader(); this.presentation = null; + document.addEventListener("DOMContentLoaded", () => this._unlockUi()); this._listenForInput(); } + _unlockUi() { + this.fileInput.disabled = false; + } + _preparePresentation(source) { const self = this; pdfjsLib.getDocument(source).then(function(pdf) { -- cgit v1.2.3