فهرست منبع

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

Vanessa 10 ماه پیش
والد
کامیت
fa0dfedba7
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      app/src/layout/dock/Files.ts

+ 4 - 0
app/src/layout/dock/Files.ts

@@ -571,6 +571,10 @@ export class Files extends Model {
                         }
                     });
                     if (!isChild) {
+                        // 禁止父节点移动到子节点 https://github.com/siyuan-note/siyuan/issues/12539
+                        if (newElement.getAttribute("data-path").startsWith(item.dataset.path.replace(".sy", ""))) {
+                            return;
+                        }
                         selectFileElements.push(item);
                         fromPaths.push(dataPath);
                     }