Merge pull request #3920 from soulsands/fix-include

fix cursor position when Jumping from note to included note
This commit is contained in:
zadam 2023-05-11 00:21:21 +02:00 committed by GitHub
commit ad2a7a2da3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -186,6 +186,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 || "");
});
}