[Editor] Avoid to scroll when an editor is unselected

This commit is contained in:
Calixte Denizet 2024-02-18 19:21:45 +01:00
parent d96fd80ca0
commit c2fcc66302

View File

@ -1503,7 +1503,9 @@ class AnnotationEditor {
if (this.div?.contains(document.activeElement)) { if (this.div?.contains(document.activeElement)) {
// Don't use this.div.blur() because we don't know where the focus will // Don't use this.div.blur() because we don't know where the focus will
// go. // go.
this._uiManager.currentLayer.div.focus(); this._uiManager.currentLayer.div.focus({
preventScroll: true,
});
} }
this.#editToolbar?.hide(); this.#editToolbar?.hide();
} }