From 05248d66be7349d07ea3778df27c49685db137a4 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 17 May 2023 11:02:49 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E5=8D=B3=E4=BD=BF=E5=9D=97=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=EF=BC=8C=E6=8A=98=E5=8F=A0=E7=9A=84=E6=83=85=E5=86=B5?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E4=B9=9F=E9=9C=80=E8=A6=81=20zoomOut?= =?UTF-8?q?=EF=BC=8C=E5=90=A6=E5=88=99=E6=8A=98=E5=8F=A0=E5=9D=97=E5=86=85?= =?UTF-8?q?=E7=9A=84=E5=85=89=E6=A0=87=E6=97=A0=E6=B3=95=E5=AE=9A=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/util/backForward.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/util/backForward.ts b/app/src/util/backForward.ts index 4bae18ea2..254ff54ca 100644 --- a/app/src/util/backForward.ts +++ b/app/src/util/backForward.ts @@ -122,7 +122,10 @@ const focusStack = async (stack: IBackStack) => { return true; } }); - if (blockElement) { + if (blockElement && + // 即使块存在,折叠的情况需要也需要 zoomOut,否则折叠块内的光标无法定位 + (!stack.zoomId || (stack.zoomId && stack.zoomId === stack.protyle.block.id)) + ) { if (blockElement.getBoundingClientRect().height === 0) { // 切换 tab stack.protyle.model.parent.parent.switchTab(stack.protyle.model.parent.headElement);