Ensure that the password dialog is always closed with the document

If the current PDF document is closed while the password dialog is open, e.g. manually by calling `PDFViewerApplication.close()` from the console, the password dialog wouldn't be closed as intended.

*Please note:* This could only affect the GENERIC viewer, although it's very unlikely to ever happen, since that's the only one that supports opening more than one PDF document.
This commit is contained in:
Jonas Jenwald 2023-07-30 17:13:39 +02:00
parent f7155ad8fa
commit 02aa561003

View File

@ -1005,7 +1005,10 @@ const PDFViewerApplication = {
this._saveInProgress = false;
this._hasAnnotationEditors = false;
promises.push(this.pdfScriptingManager.destroyPromise);
promises.push(
this.pdfScriptingManager.destroyPromise,
this.passwordPrompt.close()
);
this.setTitle();
this.pdfSidebar?.reset();