diff --git a/src/frontend/src/utils/reactflowUtils.ts b/src/frontend/src/utils/reactflowUtils.ts index 5aff862b5..0b3449b45 100644 --- a/src/frontend/src/utils/reactflowUtils.ts +++ b/src/frontend/src/utils/reactflowUtils.ts @@ -235,7 +235,12 @@ export function addVersionToDuplicates(flow: FlowType, flows: FlowType[]) { export function handleKeyDown(e: React.KeyboardEvent, inputValue: string | string[] | null, block: string) { - if (e.ctrlKey && inputValue === block && e.key === "Backspace") { + if (typeof inputValue === "string" && e.ctrlKey && e.key === "Backspace" && (inputValue === block || inputValue?.charAt(inputValue?.length - 1) === ' ')) { + e.preventDefault(); + e.stopPropagation(); + } + + if (e.ctrlKey && e.key === "Backspace" && inputValue === block) { e.preventDefault(); e.stopPropagation(); }