From c3f5566fde76d032613d33385dddffec007318dd Mon Sep 17 00:00:00 2001 From: brendanlaschke Date: Sun, 10 Sep 2023 20:41:51 +0200 Subject: [PATCH] Fix select disable not working for svg (#1523) - fixed svg elements not preventing start if selectDisable is set on parent --- .../modules/ui/utilities/drag-select/components/DragSelect.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/src/modules/ui/utilities/drag-select/components/DragSelect.tsx b/front/src/modules/ui/utilities/drag-select/components/DragSelect.tsx index e7dad4f1f..8ad7142b2 100644 --- a/front/src/modules/ui/utilities/drag-select/components/DragSelect.tsx +++ b/front/src/modules/ui/utilities/drag-select/components/DragSelect.tsx @@ -23,7 +23,7 @@ export function DragSelect({ if (!isDragSelectionStartEnabled()) { return false; } - if (target instanceof HTMLElement) { + if (target instanceof HTMLElement || target instanceof SVGElement) { let el = target; while (el.parentElement && !el.dataset.selectDisable) { el = el.parentElement;