fix(text): selection and cursor not maintained properly when switching tabs

This commit is contained in:
Elian Doran 2025-07-08 16:23:58 +03:00
parent 0f1c505823
commit e4a2a8e56d
No known key found for this signature in database

View File

@ -265,8 +265,13 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget {
} }
focus() { focus() {
const editor = this.watchdog.editor;
if (editor) {
editor.editing.view.focus();
} else {
this.$editor.trigger("focus"); this.$editor.trigger("focus");
} }
}
scrollToEnd() { scrollToEnd() {
this.watchdog?.editor?.model.change((writer) => { this.watchdog?.editor?.model.change((writer) => {