Explorar o código

:bug: 即使块存在,折叠的情况需要也需要 zoomOut,否则折叠块内的光标无法定位

Vanessa %!s(int64=2) %!d(string=hai) anos
pai
achega
05248d66be
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      app/src/util/backForward.ts

+ 4 - 1
app/src/util/backForward.ts

@@ -122,7 +122,10 @@ const focusStack = async (stack: IBackStack) => {
             return true;
             return true;
         }
         }
     });
     });
-    if (blockElement) {
+    if (blockElement &&
+        // 即使块存在,折叠的情况需要也需要 zoomOut,否则折叠块内的光标无法定位
+        (!stack.zoomId || (stack.zoomId && stack.zoomId === stack.protyle.block.id))
+    ) {
         if (blockElement.getBoundingClientRect().height === 0) {
         if (blockElement.getBoundingClientRect().height === 0) {
             // 切换 tab
             // 切换 tab
             stack.protyle.model.parent.parent.switchTab(stack.protyle.model.parent.headElement);
             stack.protyle.model.parent.parent.switchTab(stack.protyle.model.parent.headElement);