Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix: Tools cannot be moved in subgroups (fixed: streetwriters/notesnook#731)

thecodrrf40c9a40e9ee
diff --git a/apps/web/src/components/dialogs/toolbar-config-dialog.tsx b/apps/web/src/components/dialogs/toolbar-config-dialog.tsx
index 85c3a3812..22d4c237f 100644
--- a/apps/web/src/components/dialogs/toolbar-config-dialog.tsx
+++ b/apps/web/src/components/dialogs/toolbar-config-dialog.tsx
@@ -539,7 +539,8 @@ function moveItem(items: TreeNode[], fromId: string, toId: string): TreeNode[] {
const newArray = arrayMove(items, fromIndex, toIndex);
// do not allow moving an item if there's no group over it
- if (!isGroup(getItemGroup(newArray, fromItem))) return items;
+ const itemGroup = getItemGroup(newArray, fromItem);
+ if (!isGroup(itemGroup) && !isSubgroup(itemGroup)) return items;
return newArray;
}