Merge pull request #17688 from calixteman/editor_no_scroll_unselect

[Editor] Avoid to scroll when an editor is unselected
This commit is contained in:
calixteman 2024-02-20 17:00:43 +01:00 committed by GitHub
commit 70015ffe6b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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