Ensure that the errorWrapper is closed when a new document is opened (issue 4625)
This commit is contained in:
parent
e874995a0d
commit
12f3d58506
@ -561,6 +561,9 @@ var PDFView = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
close: function pdfViewClose() {
|
close: function pdfViewClose() {
|
||||||
|
var errorWrapper = document.getElementById('errorWrapper');
|
||||||
|
errorWrapper.setAttribute('hidden', 'true');
|
||||||
|
|
||||||
if (!this.pdfDocument) {
|
if (!this.pdfDocument) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -568,9 +571,6 @@ var PDFView = {
|
|||||||
this.pdfDocument.destroy();
|
this.pdfDocument.destroy();
|
||||||
this.pdfDocument = null;
|
this.pdfDocument = null;
|
||||||
|
|
||||||
var errorWrapper = document.getElementById('errorWrapper');
|
|
||||||
errorWrapper.setAttribute('hidden', 'true');
|
|
||||||
|
|
||||||
var thumbsView = document.getElementById('thumbnailView');
|
var thumbsView = document.getElementById('thumbnailView');
|
||||||
while (thumbsView.hasChildNodes()) {
|
while (thumbsView.hasChildNodes()) {
|
||||||
thumbsView.removeChild(thumbsView.lastChild);
|
thumbsView.removeChild(thumbsView.lastChild);
|
||||||
@ -594,11 +594,10 @@ var PDFView = {
|
|||||||
open: function pdfViewOpen(url, scale, password,
|
open: function pdfViewOpen(url, scale, password,
|
||||||
pdfDataRangeTransport, args) {
|
pdfDataRangeTransport, args) {
|
||||||
if (this.pdfDocument) {
|
if (this.pdfDocument) {
|
||||||
this.close();
|
|
||||||
|
|
||||||
// Reload the preferences if a document was previously opened.
|
// Reload the preferences if a document was previously opened.
|
||||||
Preferences.reload();
|
Preferences.reload();
|
||||||
}
|
}
|
||||||
|
this.close();
|
||||||
|
|
||||||
var parameters = {password: password};
|
var parameters = {password: password};
|
||||||
if (typeof url === 'string') { // URL
|
if (typeof url === 'string') { // URL
|
||||||
|
Loading…
x
Reference in New Issue
Block a user