fix: block right-click pointerdown from reaching dnd-kit

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
EENE Dashboard
2026-06-01 12:59:45 +09:00
parent 495a535d17
commit c6dc27ef29

View File

@@ -175,6 +175,13 @@ export function TaskCard({
{...dragAttributes}
{...dragListeners}
className="bg-white rounded-2xl px-5 py-3 mb-3 shadow-sm border border-gray-100 hover:shadow-md hover:border-gray-200 transition-all select-none h-[112px] cursor-grab active:cursor-grabbing overflow-hidden"
onPointerDown={(e) => {
// 우클릭(button !== 0)을 dnd-kit에 전달하지 않음
// dnd-kit은 pointerdown→pointerup 시 synthetic click을 발화하는데
// 이것이 우클릭에도 적용되어 상세창이 열리는 원인
if (e.button !== 0) return;
dragListeners?.onPointerDown?.(e);
}}
onClick={onCardClick}
onContextMenu={handleContextMenu}
>