From 3c66b031e33d9cc20c728179f826fdef344b6560 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Tue, 14 Feb 2023 12:52:03 +0100 Subject: [PATCH] Don't try to place the `xfaLayer` "on top" in regular PDF documents Given that we only create an `xfaLayer` in "pure" XFA-documents, this code can be moved into the appropriate branch instead. --- web/pdf_page_view.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/web/pdf_page_view.js b/web/pdf_page_view.js index 5e56bce8a..ed413a06c 100644 --- a/web/pdf_page_view.js +++ b/web/pdf_page_view.js @@ -863,11 +863,6 @@ class PDFPageView { }); } - if (this.xfaLayer?.div) { - // The xfa layer needs to stay on top. - div.append(this.xfaLayer.div); - } - let renderContinueCallback = null; if (this.renderingQueue) { renderContinueCallback = cont => { @@ -967,6 +962,9 @@ class PDFPageView { annotationStorage, linkService, }); + } else if (this.xfaLayer.div) { + // The xfa layer needs to stay on top. + div.append(this.xfaLayer.div); } this.#renderXfaLayer(); }