From 91349bd2e8f9a0fe1bf48a2e09d756504dcae3a3 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 12 Apr 2023 15:06:57 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/7961 --- app/src/protyle/wysiwyg/index.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts index 81fc8eb03..822d0c822 100644 --- a/app/src/protyle/wysiwyg/index.ts +++ b/app/src/protyle/wysiwyg/index.ts @@ -1490,9 +1490,12 @@ export class WYSIWYG { const breadcrumbId = backlinkBreadcrumbItemElement.getAttribute("data-id"); if (breadcrumbId) { if (ctrlIsPressed) { - openFileById({ - id: breadcrumbId, - action: breadcrumbId === protyle.block.rootID ? [Constants.CB_GET_FOCUS] : [Constants.CB_GET_FOCUS, Constants.CB_GET_ALL] + fetchPost("/api/block/checkBlockFold", {id: breadcrumbId}, (foldResponse) => { + openFileById({ + id: breadcrumbId, + action: foldResponse.data ? [Constants.CB_GET_FOCUS, Constants.CB_GET_ALL] : [Constants.CB_GET_FOCUS, Constants.CB_GET_CONTEXT], + zoomIn: foldResponse.data + }); }); } else { loadBreadcrumb(protyle, backlinkBreadcrumbItemElement);