From 90b8de3b10d294dcb6ccfa291beab9c5832c5625 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 6 Jun 2022 15:52:50 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/5094 --- app/src/protyle/util/onGet.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/util/onGet.ts b/app/src/protyle/util/onGet.ts index 9f8b59dd6..e0be15ad6 100644 --- a/app/src/protyle/util/onGet.ts +++ b/app/src/protyle/util/onGet.ts @@ -141,8 +141,10 @@ const setHTML = (options: { content: string, action?: string[] }, protyle: IProt if (!options.action.includes(Constants.CB_GET_UNUNDO)) { pushBack(protyle, undefined, focusElement); } + focusElement.scrollIntoView(); + // 减少抖动 https://ld246.com/article/1654263598088 setTimeout(() => { - scrollCenter(protyle, focusElement, true); + focusElement.scrollIntoView(); }, Constants.TIMEOUT_BLOCKLOAD); } else { focusBlock(protyle.wysiwyg.element.firstElementChild);