diff --git a/web/app.js b/web/app.js index 8c77243d9..72019cabd 100644 --- a/web/app.js +++ b/web/app.js @@ -943,6 +943,13 @@ const PDFViewerApplication = { this.pdfLoadingTask = loadingTask; loadingTask.onPassword = (updateCallback, reason) => { + if (this.isViewerEmbedded) { + // The load event can't be triggered until the password is entered, so + // if the viewer is in an iframe and its visibility depends on the + // onload callback then the viewer never shows (bug 1801341). + this._unblockDocumentLoadEvent(); + } + this.pdfLinkService.externalLinkEnabled = false; this.passwordPrompt.setUpdateCallback(updateCallback, reason); this.passwordPrompt.open();