From 53e8d039b9587bc2ee331b09428f0ff7f96a3cee Mon Sep 17 00:00:00 2001 From: Aaryan Khandelwal Date: Wed, 27 Sep 2023 12:12:48 +0530 Subject: [PATCH] fix: block click happening while moving --- web/components/gantt-chart/helpers/draggable.tsx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/web/components/gantt-chart/helpers/draggable.tsx b/web/components/gantt-chart/helpers/draggable.tsx index b665bf5d3ca..79dc2a72a09 100644 --- a/web/components/gantt-chart/helpers/draggable.tsx +++ b/web/components/gantt-chart/helpers/draggable.tsx @@ -179,11 +179,6 @@ export const ChartDraggable: React.FC = ({ if (e.button !== 0) return; - e.preventDefault(); - e.stopPropagation(); - - setIsMoving(true); - const resizableDiv = resizableRef.current; const columnWidth = currentViewData.data.width; @@ -193,6 +188,8 @@ export const ChartDraggable: React.FC = ({ let initialMarginLeft = parseInt(resizableDiv.style.marginLeft); const handleMouseMove = (e: MouseEvent) => { + setIsMoving(true); + let delWidth = 0; delWidth = checkScrollEnd(e); @@ -295,7 +292,9 @@ export const ChartDraggable: React.FC = ({ )}