diff --git a/src/display/annotation_layer.js b/src/display/annotation_layer.js index f9724575c..b44633e11 100644 --- a/src/display/annotation_layer.js +++ b/src/display/annotation_layer.js @@ -2157,7 +2157,7 @@ class PopupElement { */ #hide() { this.#container.classList.remove("focused"); - if (this.#pinned) { + if (this.#pinned || !this.isVisible) { return; } this.#container.hidden = true;