From b8370abd1fcf74b524094f742471c271040a03c0 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 2 Feb 2023 15:33:34 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/7225 --- app/src/protyle/breadcrumb/index.ts | 9 +++++++-- app/src/protyle/wysiwyg/index.ts | 5 ++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/src/protyle/breadcrumb/index.ts b/app/src/protyle/breadcrumb/index.ts index 32d30676d..81bf832ff 100644 --- a/app/src/protyle/breadcrumb/index.ts +++ b/app/src/protyle/breadcrumb/index.ts @@ -54,7 +54,10 @@ export class Breadcrumb { if (id) { if (protyle.options.render.breadcrumbDocName && window.siyuan.ctrlIsPressed) { /// #if !MOBILE - openFileById({id, action: [Constants.CB_GET_FOCUS]}); + openFileById({ + id, + action: id === protyle.block.rootID ? [Constants.CB_GET_FOCUS] : [Constants.CB_GET_FOCUS, Constants.CB_GET_ALL] + }); /// #endif } else { zoomOut(protyle, id); @@ -173,7 +176,9 @@ export class Breadcrumb { icon: "iconDownload", label: `${window.siyuan.languages.insertAsset}${uploadHTML}`, }).element; - uploadMenu.querySelector("input").addEventListener("change", (event: InputEvent & { target: HTMLInputElement }) => { + uploadMenu.querySelector("input").addEventListener("change", (event: InputEvent & { + target: HTMLInputElement + }) => { if (event.target.files.length === 0) { return; } diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts index cfd9aef14..8644abded 100644 --- a/app/src/protyle/wysiwyg/index.ts +++ b/app/src/protyle/wysiwyg/index.ts @@ -1436,7 +1436,10 @@ export class WYSIWYG { const breadcrumbId = backlinkBreadcrumbItemElement.getAttribute("data-id"); if (breadcrumbId) { if (window.siyuan.ctrlIsPressed) { - openFileById({id: breadcrumbId, action: [Constants.CB_GET_FOCUS]}); + openFileById({ + id: breadcrumbId, + action: breadcrumbId === protyle.block.rootID ? [Constants.CB_GET_FOCUS] : [Constants.CB_GET_FOCUS, Constants.CB_GET_ALL] + }); } else { loadBreadcrumb(protyle, backlinkBreadcrumbItemElement); }