瀏覽代碼

:bug: fix https://github.com/siyuan-note/siyuan/issues/8356

Vanessa 2 年之前
父節點
當前提交
b50dd5dca5
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/src/protyle/util/resize.ts

+ 1 - 1
app/src/protyle/util/resize.ts

@@ -16,7 +16,7 @@ export const resize = (protyle: IProtyle) => {
             });
         }
         // 保持光标位置不变 https://ld246.com/article/1673704873983/comment/1673765814595#comments
-        if (protyle.toolbar.range) {
+        if (!protyle.disabled && protyle.toolbar.range) {
             let rangeRect = protyle.toolbar.range.getBoundingClientRect();
             if (rangeRect.height === 0) {
                 const blockElement = hasClosestBlock(protyle.toolbar.range.startContainer);