Unblock the load event when the pdf has a password (bug 1801341)
This commit is contained in:
		
							parent
							
								
									748be3f702
								
							
						
					
					
						commit
						38dd219d85
					
				@ -943,6 +943,13 @@ const PDFViewerApplication = {
 | 
				
			|||||||
    this.pdfLoadingTask = loadingTask;
 | 
					    this.pdfLoadingTask = loadingTask;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    loadingTask.onPassword = (updateCallback, reason) => {
 | 
					    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.pdfLinkService.externalLinkEnabled = false;
 | 
				
			||||||
      this.passwordPrompt.setUpdateCallback(updateCallback, reason);
 | 
					      this.passwordPrompt.setUpdateCallback(updateCallback, reason);
 | 
				
			||||||
      this.passwordPrompt.open();
 | 
					      this.passwordPrompt.open();
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user