From 8eb0a4e1cbcebd8103f53084b999fe3b11e1b7ff Mon Sep 17 00:00:00 2001 From: baiyongjie <407221377@qq.com> Date: Wed, 10 May 2023 18:08:25 +0800 Subject: [PATCH] fix cursor position when Jumping from note to included note (cherry picked from commit 6a9aa5eedaf27d8b077d200cca659eef541b2143) --- src/public/app/widgets/type_widgets/editable_text.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/public/app/widgets/type_widgets/editable_text.js b/src/public/app/widgets/type_widgets/editable_text.js index aa1015242..1bae06696 100644 --- a/src/public/app/widgets/type_widgets/editable_text.js +++ b/src/public/app/widgets/type_widgets/editable_text.js @@ -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 || ""); }); }