mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 09:30:14 +01:00
🚨
This commit is contained in:
parent
2ee6b54bc7
commit
1ad395ceec
1 changed files with 7 additions and 7 deletions
|
|
@ -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");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue