fix(sidebar): prevent text selection when dragging project/workspace rows

The drag handle was attached only to the left sub-view of each row, so
grabbing the right half initiated no drag, and pointerdown on the branch
or project title raced the browser's text-selection start before
dnd-kit's activation threshold — often producing a text selection
instead of a drag.

Move dragHandleProps to the outer row wrapper, add userSelect: none to
the row styles, and tighten PointerSensor activation distance.
This commit is contained in:
Mohamed Boudra
2026-04-20 10:49:46 +07:00
parent fb02bc8795
commit 002946d4dd
2 changed files with 22 additions and 15 deletions
@@ -142,7 +142,7 @@ export function DraggableList<T>({
const sensors = useSensors(
useSensor(PointerSensor, {
activationConstraint: {
distance: 8,
distance: 6,
},
}),
useSensor(KeyboardSensor, {