fix cursor position when Jumping from note to included note

(cherry picked from commit 6a9aa5eeda)
This commit is contained in:
baiyongjie 2023-05-10 18:08:25 +08:00 committed by zadam
parent 04caba9f5b
commit 8eb0a4e1cb

View file

@ -187,6 +187,11 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget {
const noteComplement = await froca.getNoteComplement(note.noteId);
await this.spacedUpdate.allowUpdateWithoutChange(() => {
// https://github.com/zadam/trilium/issues/3914
// todo: quite hacky, but it works. remove it if ckeditor has fixed it.
this.$editor.trigger('focus');
this.$editor.trigger('blur')
this.watchdog.editor.setData(noteComplement.content || "");
});
}