Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/17762

Vanessabb112707efdb
diff --git a/app/src/layout/dock/Files.ts b/app/src/layout/dock/Files.ts
index 5ead35d3a3..b16bc62e10 100644
--- a/app/src/layout/dock/Files.ts
+++ b/app/src/layout/dock/Files.ts
@@ -753,6 +753,7 @@ export class Files extends Model {
} else if ((ulSort === "6" || (window.siyuan.config.fileTree.sort === 6 && ulSort === "15")) && selectFileElements.length > 0) {
let hasMove = false;
const toDir = pathPosix().dirname(toPath);
+ const newElementClassList = newElement.getAttribute("class");
if (fromPaths.length > 0) {
await fetchSyncPost("/api/filetree/moveDocs", {
toNotebook: toURL,
@@ -765,7 +766,7 @@ export class Files extends Model {
});
hasMove = true;
}
- if (newElement.classList.contains("dragover__top")) {
+ if (newElementClassList.includes("dragover__top")) {
selectFileElements.forEach(item => {
let nextULElement;
if (item.nextElementSibling && item.nextElementSibling.tagName === "UL") {
@@ -776,7 +777,7 @@ export class Files extends Model {
item.after(nextULElement);
}
});
- } else if (newElement.classList.contains("dragover__bottom")) {
+ } else if (newElementClassList.includes("dragover__bottom")) {
selectFileElements.reverse().forEach(item => {
let nextULElement;
if (item.nextElementSibling && item.nextElementSibling.tagName === "UL") {