From 8595ccfd20c43afab1b8b3a2ad9be3ed859a0f54 Mon Sep 17 00:00:00 2001 From: Kim Lan Phan Hoang Date: Tue, 6 Aug 2024 11:29:45 +0200 Subject: [PATCH] fix: does not trigger drag on mousedown svg (#1396) --- src/components/main/list/useDragSelection.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/main/list/useDragSelection.tsx b/src/components/main/list/useDragSelection.tsx index f1caec0e4..dea70fbc7 100644 --- a/src/components/main/list/useDragSelection.tsx +++ b/src/components/main/list/useDragSelection.tsx @@ -53,7 +53,7 @@ export const useDragSelection = ({ }, shouldStartSelecting: (e) => { // does not trigger drag selection if mousedown on card - if (e instanceof HTMLElement) { + if (e instanceof HTMLElement || e instanceof SVGElement) { return !e?.closest(`.${elementClass}`); } return true;