diff --git a/src-web/components/Sidebar.tsx b/src-web/components/Sidebar.tsx index 5f595080..39b4646f 100644 --- a/src-web/components/Sidebar.tsx +++ b/src-web/components/Sidebar.tsx @@ -329,6 +329,11 @@ export function Sidebar({ className }: Props) { return; } + // Block dragging folder into itself + if (hoveredTree.item.id === itemId) { + return; + } + const parentTree = treeParentMap[itemId] ?? null; const index = parentTree?.children.findIndex((n) => n.item.id === itemId) ?? -1; const child = parentTree?.children[index ?? -1]; @@ -647,7 +652,7 @@ const SidebarItem = forwardRef(function SidebarItem( return (