From 315f450b0177e86a6bfe13c971a67c5b0b5e383d Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Mon, 4 Jul 2022 09:33:27 +0200 Subject: [PATCH] Fix the Popup-trigger for `FileAttachmentAnnotationElement` (PR 15036 follow-up) After the changes in PR 15036, the trigger-element created in `FileAttachmentAnnotationElement.render` is now too small. This can be fixed by using the same approach as in PR 15065, and the patch can be tested using the `annotation-fileattachment.pdf` document in the test-suite. --- src/display/annotation_layer.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/display/annotation_layer.js b/src/display/annotation_layer.js index 216e4b1a0..064ee3b3e 100644 --- a/src/display/annotation_layer.js +++ b/src/display/annotation_layer.js @@ -2400,8 +2400,7 @@ class FileAttachmentAnnotationElement extends AnnotationElement { this.container.className = "fileAttachmentAnnotation"; const trigger = document.createElement("div"); - trigger.style.height = this.container.style.height; - trigger.style.width = this.container.style.width; + trigger.className = "popupTriggerArea"; trigger.addEventListener("dblclick", this._download.bind(this)); if (