ソースを参照

:art: fix https://github.com/siyuan-note/siyuan/issues/5094

Vanessa 3 年 前
コミット
90b8de3b10
1 ファイル変更3 行追加1 行削除
  1. 3 1
      app/src/protyle/util/onGet.ts

+ 3 - 1
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);