Browse Source

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

Vanessa 2 years ago
parent
commit
70e007ec29
1 changed files with 2 additions and 0 deletions
  1. 2 0
      app/src/menus/protyle.ts

+ 2 - 0
app/src/menus/protyle.ts

@@ -1278,6 +1278,8 @@ export const setFold = (protyle: IProtyle, nodeElement: Element, isOpen?: boolea
             const blockElement = hasClosestBlock(range.startContainer);
             if (blockElement && blockElement.getBoundingClientRect().width === 0) {
                 getSelection().removeRange(range);
+                // https://github.com/siyuan-note/siyuan/issues/5833
+                focusBlock(nodeElement, undefined, false);
             }
         }
     }