No keyboard movement when bound

This commit is contained in:
Mark Tolmacs
2025-07-28 16:56:15 +02:00
parent fa765fa343
commit e5cd93be4b
2 changed files with 6 additions and 2 deletions

View File

@@ -2,6 +2,7 @@ import {
TEXT_AUTOWRAP_THRESHOLD,
getGridPoint,
getFontString,
DRAGGING_THRESHOLD,
} from "@excalidraw/common";
import type {
@@ -141,7 +142,8 @@ export const dragSelectedElements = (
} else if (
// NOTE: Add a little initial drag to the arrow dragging to avoid
// accidentally unbinding the arrow when the user just wants to select it.
Math.max(Math.abs(adjustedOffset.x), Math.abs(adjustedOffset.y)) > 1
Math.max(Math.abs(adjustedOffset.x), Math.abs(adjustedOffset.y)) >
DRAGGING_THRESHOLD
) {
updateElementCoords(pointerDownState, element, scene, adjustedOffset);

View File

@@ -4416,7 +4416,9 @@ class App extends React.Component<AppProps, AppState> {
const arrowIdsToRemove = new Set<string>();
selectedElements
.filter(isElbowArrow)
.filter((el): el is NonDeleted<ExcalidrawArrowElement> =>
isBindingElement(el),
)
.filter((arrow) => {
const startElementNotInSelection =
arrow.startBinding &&