mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: block click happening while moving (#2275)
This commit is contained in:
parent
2d8cbccfbc
commit
5298f1e53c
@ -179,11 +179,6 @@ export const ChartDraggable: React.FC<Props> = ({
|
||||
|
||||
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<Props> = ({
|
||||
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<Props> = ({
|
||||
</>
|
||||
)}
|
||||
<div
|
||||
className="relative z-[2] rounded h-8 w-full flex items-center"
|
||||
className={`relative z-[2] rounded h-8 w-full flex items-center ${
|
||||
isMoving ? "pointer-events-none" : ""
|
||||
}`}
|
||||
onMouseDown={handleBlockMove}
|
||||
>
|
||||
<BlockRender data={block.data} />
|
||||
|
Loading…
Reference in New Issue
Block a user