Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(core): unexpected collection item drag event (#6443)

JimmFlyf93ffbeb6fb2
diff --git a/packages/frontend/core/src/components/pure/workspace-slider-bar/collections/collections-list.tsx b/packages/frontend/core/src/components/pure/workspace-slider-bar/collections/collections-list.tsx
index 09e0cd5fc6..a6b9a45dfa 100644
--- a/packages/frontend/core/src/components/pure/workspace-slider-bar/collections/collections-list.tsx
+++ b/packages/frontend/core/src/components/pure/workspace-slider-bar/collections/collections-list.tsx
@@ -162,6 +162,10 @@ export const CollectionSidebarNavItem = ({
postfix={
<div
onClick={stopPropagation}
+ onMouseDown={e => {
+ // prevent drag
+ e.stopPropagation();
+ }}
style={{ display: 'flex', alignItems: 'center' }}
>
<CollectionOperations