diff --git a/src/display/editor/editor.js b/src/display/editor/editor.js index 2de0aea40d4367..f883c57eebb8e9 100644 --- a/src/display/editor/editor.js +++ b/src/display/editor/editor.js @@ -836,6 +836,7 @@ class AnnotationEditor { altText.addEventListener( "click", event => { + this.#altTextButton.hidden = true; event.preventDefault(); this._uiManager.editAltText(this); }, @@ -919,6 +920,10 @@ class AnnotationEditor { } } + altTextFinish() { + this.#altTextButton.hidden = false; + } + getClientDimensions() { return this.div.getBoundingClientRect(); } diff --git a/web/alt_text_manager.js b/web/alt_text_manager.js index 48bd2df02a7e92..a8e165268c5d78 100644 --- a/web/alt_text_manager.js +++ b/web/alt_text_manager.js @@ -264,6 +264,7 @@ class AltTextManager { this.#removeOnClickListeners(); this.#uiManager?.addEditListeners(); this.#eventBus._off("resize", this.#boundSetPosition); + this.#currentEditor.altTextFinish(); this.#currentEditor = null; this.#uiManager = null; }