diff --git a/app/src/layout/dock/Files.ts b/app/src/layout/dock/Files.ts index c728b9730..10a338b80 100644 --- a/app/src/layout/dock/Files.ts +++ b/app/src/layout/dock/Files.ts @@ -191,13 +191,13 @@ export class Files extends Model { let target = event.target as HTMLElement; while (target && !target.isEqualNode(this.element)) { if (target.tagName === "LI" && !target.getAttribute("data-opening")) { - target.setAttribute("data-opening", "true") + target.setAttribute("data-opening", "true"); openFileById({ removeCurrentTab: false, id: target.getAttribute("data-node-id"), action: [Constants.CB_GET_FOCUS, Constants.CB_GET_SCROLL], afterOpen() { - target.removeAttribute("data-opening") + target.removeAttribute("data-opening"); } }); event.stopPropagation(); @@ -257,7 +257,7 @@ export class Files extends Model { if (target.getAttribute("data-type") === "navigation-file") { needFocus = false; if (target.getAttribute("data-opening")) { - return + return; } target.setAttribute("data-opening", "true"); if (event.altKey && !event.metaKey && !event.ctrlKey && !event.shiftKey) { @@ -266,7 +266,7 @@ export class Files extends Model { position: "right", action: [Constants.CB_GET_FOCUS, Constants.CB_GET_SCROLL], afterOpen() { - target.removeAttribute("data-opening") + target.removeAttribute("data-opening"); } }); } else if (!event.altKey && !event.metaKey && !event.ctrlKey && event.shiftKey) { @@ -275,7 +275,7 @@ export class Files extends Model { position: "bottom", action: [Constants.CB_GET_FOCUS, Constants.CB_GET_SCROLL], afterOpen() { - target.removeAttribute("data-opening") + target.removeAttribute("data-opening"); } }); } else if (window.siyuan.config.fileTree.openFilesUseCurrentTab && @@ -285,7 +285,7 @@ export class Files extends Model { id: target.getAttribute("data-node-id"), action: [Constants.CB_GET_FOCUS, Constants.CB_GET_SCROLL], afterOpen() { - target.removeAttribute("data-opening") + target.removeAttribute("data-opening"); } }); } else { @@ -293,7 +293,7 @@ export class Files extends Model { id: target.getAttribute("data-node-id"), action: [Constants.CB_GET_FOCUS, Constants.CB_GET_SCROLL], afterOpen() { - target.removeAttribute("data-opening") + target.removeAttribute("data-opening"); } }); }