diff --git a/packages/excalidraw/components/App.tsx b/packages/excalidraw/components/App.tsx index 693aafe92a..9b6e9195f8 100644 --- a/packages/excalidraw/components/App.tsx +++ b/packages/excalidraw/components/App.tsx @@ -898,7 +898,7 @@ class App extends React.Component { arrow: ExcalidrawArrowElement, hoveredElement: NonDeletedExcalidrawElement | null, ) { - if (isElbowArrow(arrow)) { + if (arrow.isDeleted || isElbowArrow(arrow)) { return; } @@ -913,7 +913,7 @@ class App extends React.Component { if (!this.state.multiElement) { invariant( this.state.selectedLinearElement?.selectedPointsIndices?.length, - "There has to be at least one selected point to trigger bind mode change at arrow drag creation", + "There has to be at least one selected point to trigger bind mode change at arrow point drag", ); const startDragged = @@ -8708,6 +8708,10 @@ class App extends React.Component { elementsMap, ); + if (element?.isDeleted) { + return; + } + if (isBindingElement(element)) { const hoveredElement = getHoveredElementForBinding( pointFrom(pointerCoords.x, pointerCoords.y), @@ -9195,7 +9199,7 @@ class App extends React.Component { newElement, }); } - } else if (isLinearElement(newElement)) { + } else if (isLinearElement(newElement) && !newElement.isDeleted) { pointerDownState.drag.hasOccurred = true; const points = newElement.points;