This commit is contained in:
Vanessa 2023-02-02 15:33:34 +08:00
parent 65c5bfcb63
commit b8370abd1f
2 changed files with 11 additions and 3 deletions

View file

@ -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;
}

View file

@ -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);
}