From aefd33d6b8fc57c2e9ce4e15b147cc7dcd1ab2df Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 7 Feb 2023 11:41:25 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/7272 --- app/src/protyle/breadcrumb/index.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/protyle/breadcrumb/index.ts b/app/src/protyle/breadcrumb/index.ts index 81bf832ff..d58862c05 100644 --- a/app/src/protyle/breadcrumb/index.ts +++ b/app/src/protyle/breadcrumb/index.ts @@ -76,13 +76,18 @@ export class Breadcrumb { event.preventDefault(); break; } else if (target.getAttribute("data-type") === "context") { + event.preventDefault(); + if (protyle.block.rootID === protyle.options.blockId) { + target.classList.toggle("block__icon--active") + return; + } if (target.classList.contains("block__icon--active")) { fetchPost("/api/filetree/getDoc", { id: protyle.options.blockId, mode: 0, size: window.siyuan.config.editor.dynamicLoadBlocks, }, getResponse => { - onGet(getResponse, protyle); + onGet(getResponse, protyle, [Constants.CB_GET_ALL]); }); target.classList.remove("block__icon--active"); } else { @@ -95,7 +100,6 @@ export class Breadcrumb { }); target.classList.add("block__icon--active"); } - event.preventDefault(); break; } target = target.parentElement;