diff --git a/web/app.js b/web/app.js index 3997cb87e..6f3f884a7 100644 --- a/web/app.js +++ b/web/app.js @@ -602,8 +602,12 @@ const PDFViewerApplication = { } if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) { - const fileInput = appConfig.openFileInput; + const fileInput = (this._openFileInput = document.createElement("input")); + fileInput.id = "fileInput"; + fileInput.hidden = true; + fileInput.type = "file"; fileInput.value = null; + document.body.append(fileInput); fileInput.addEventListener("change", function (evt) { const { files } = evt.target; @@ -2383,8 +2387,7 @@ if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) { // eslint-disable-next-line no-var var webViewerOpenFile = function (evt) { - const fileInput = PDFViewerApplication.appConfig.openFileInput; - fileInput.click(); + PDFViewerApplication._openFileInput?.click(); }; } diff --git a/web/viewer-geckoview.html b/web/viewer-geckoview.html index af03111b4..7076a436b 100644 --- a/web/viewer-geckoview.html +++ b/web/viewer-geckoview.html @@ -123,10 +123,5 @@ See https://github.com/adobe-type-tools/cmap-resources
- - - - -