Don't remove the loading icon from the DOM when a page is resetted
This commit is contained in:
parent
d90e62e806
commit
20037e9919
@ -429,6 +429,7 @@ class PDFPageView {
|
||||
case annotationEditorLayerNode:
|
||||
case xfaLayerNode:
|
||||
case textLayerNode:
|
||||
case this.loadingIconDiv:
|
||||
continue;
|
||||
}
|
||||
node.remove();
|
||||
@ -472,8 +473,18 @@ class PDFPageView {
|
||||
delete this.svg;
|
||||
}
|
||||
|
||||
this.loadingIconDiv = document.createElement("div");
|
||||
this.loadingIconDiv.className = "loadingIcon notVisible";
|
||||
if (!this.loadingIconDiv) {
|
||||
this.loadingIconDiv = document.createElement("div");
|
||||
this.loadingIconDiv.className = "loadingIcon notVisible";
|
||||
this.loadingIconDiv.setAttribute("role", "img");
|
||||
this.l10n.get("loading").then(msg => {
|
||||
this.loadingIconDiv?.setAttribute("aria-label", msg);
|
||||
});
|
||||
div.append(this.loadingIconDiv);
|
||||
} else {
|
||||
this.toggleLoadingIconSpinner();
|
||||
}
|
||||
|
||||
if (
|
||||
(typeof PDFJSDev === "undefined" ||
|
||||
PDFJSDev.test("!PRODUCTION || GENERIC")) &&
|
||||
@ -481,11 +492,6 @@ class PDFPageView {
|
||||
) {
|
||||
this.toggleLoadingIconSpinner(/* viewVisible = */ true);
|
||||
}
|
||||
this.loadingIconDiv.setAttribute("role", "img");
|
||||
this.l10n.get("loading").then(msg => {
|
||||
this.loadingIconDiv?.setAttribute("aria-label", msg);
|
||||
});
|
||||
div.append(this.loadingIconDiv);
|
||||
}
|
||||
|
||||
update({ scale = 0, rotation = null, optionalContentConfigPromise = null }) {
|
||||
|
Loading…
Reference in New Issue
Block a user