fix: block right-click pointerdown from reaching dnd-kit
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -175,6 +175,13 @@ export function TaskCard({
|
|||||||
{...dragAttributes}
|
{...dragAttributes}
|
||||||
{...dragListeners}
|
{...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"
|
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}
|
onClick={onCardClick}
|
||||||
onContextMenu={handleContextMenu}
|
onContextMenu={handleContextMenu}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user