From dc0a6fa57ca8424de0432a95b2a36a8591b5b2d0 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 27 Jun 2022 22:32:15 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/5303 --- app/src/editor/index.ts | 1 + app/src/protyle/index.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/app/src/editor/index.ts b/app/src/editor/index.ts index a96d7c987..8b7896ea7 100644 --- a/app/src/editor/index.ts +++ b/app/src/editor/index.ts @@ -62,6 +62,7 @@ export class Editor extends Model { } }, }); + // 需在 after 回调之前,否则不会聚焦 https://github.com/siyuan-note/siyuan/issues/5303 this.editor.protyle.model = this; } } diff --git a/app/src/protyle/index.ts b/app/src/protyle/index.ts index 18ff20278..cf805726b 100644 --- a/app/src/protyle/index.ts +++ b/app/src/protyle/index.ts @@ -185,6 +185,7 @@ class Protyle { }); } }); + // 需等渲染完后再回调,用于定位搜索字段 https://github.com/siyuan-note/siyuan/issues/3171 if (mergedOptions.after) { mergedOptions.after(this); }