Skip to content

The open alternative to Salesforce, designed for AI.

Fix select disable not working for svg (#1523)

brendanlaschkec3f5566fde76
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 e7dad4f1f12..8ad7142b2a3 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;