Skip to content

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

fix: tools cannot be dragged & dropped

thecodrrc882fc16b8af
diff --git a/apps/web/src/components/dialogs/toolbar-config-dialog.tsx b/apps/web/src/components/dialogs/toolbar-config-dialog.tsx
index a76185d87..4f3d18434 100644
--- a/apps/web/src/components/dialogs/toolbar-config-dialog.tsx
+++ b/apps/web/src/components/dialogs/toolbar-config-dialog.tsx
@@ -47,8 +47,6 @@ export type ToolbarConfigDialogProps = {
onClose: Perform;
};
-const ReactModalContent = document.querySelector(".ReactModal__Overlay");
-
export default function ToolbarConfigDialog(props: ToolbarConfigDialogProps) {
const sensors = useSensors(
useSensor(PointerSensor),
@@ -223,7 +221,7 @@ export default function ToolbarConfigDialog(props: ToolbarConfigDialogProps) {
>
<TreeNodeComponent overlay item={activeItem} />
</DragOverlay>,
- ReactModalContent || document.body
+ document.querySelector(".ReactModal__Overlay") || document.body
)}
</SortableContext>
</DndContext>
@@ -593,6 +591,8 @@ function isCollapsed(item: TreeNode, activeItem: TreeNode): boolean {
// if a subgroup is selected, we collapse only the items.
if (isSubgroup(activeItem) && isItem(item)) return true;
+ if (item.id === activeItem.id) return true;
+
return false;
}