This commit is contained in:
Vanessa 2022-11-07 16:19:31 +08:00
parent 81092ed42d
commit 019291bd08

View file

@ -437,7 +437,7 @@ export class Files extends Model {
}); });
} }
if ((newElement.classList.contains("dragover__bottom") || newElement.classList.contains("dragover__top")) && window.siyuan.config.fileTree.sort === 6) { if ((newElement.classList.contains("dragover__bottom") || newElement.classList.contains("dragover__top")) && window.siyuan.config.fileTree.sort === 6) {
if (selectRootElements.length === fromPaths.length) { if (selectRootElements.length > 0 && newElement.getAttribute("data-path") === "/") {
if (newElement.classList.contains("dragover__top")) { if (newElement.classList.contains("dragover__top")) {
selectRootElements.forEach(item => { selectRootElements.forEach(item => {
newElement.parentElement.before(item.parentElement); newElement.parentElement.before(item.parentElement);