mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Unblock the load event when the pdf has a password (bug 1801341)
This commit is contained in:
parent
748be3f702
commit
38dd219d85
1 changed files with 7 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue