Skip to content

Commit 6c65f20

Browse files
feat: Add drag and drop functionality to clipboard groups (#594)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
1 parent 2bf7e26 commit 6c65f20

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

apps/roam/src/components/canvas/Clipboard.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -933,11 +933,20 @@ const ClipboardPageSection = ({
933933
return (
934934
<div key={group.uid} className="space-y-1">
935935
<div
936-
className="group flex cursor-pointer items-center gap-2 rounded bg-white p-2 hover:bg-gray-50"
936+
className="group flex cursor-pointer items-center gap-2 rounded bg-white p-2 hover:bg-gray-50 active:cursor-grabbing"
937+
style={{ cursor: "grab" }}
938+
data-clipboard-node-uid={group.uid}
939+
data-clipboard-node-text={group.text}
937940
onClick={(e) => {
938941
e.stopPropagation();
942+
// Don't toggle if we just completed a drag operation
943+
if (rHasDragged.current) {
944+
return;
945+
}
939946
toggleCollapse(group.uid);
940947
}}
948+
onPointerDown={handlePointerDown}
949+
onPointerUp={handlePointerUp}
941950
>
942951
<div className="flex items-center gap-2">
943952
<div className="flex items-center gap-1">

0 commit comments

Comments
 (0)