From a531cc6066579d21007b94655efc5c4604047bd5 Mon Sep 17 00:00:00 2001 From: Cristhian Zanforlin Lousa Date: Mon, 14 Aug 2023 15:58:26 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20chore(reactflowUtils.ts):=20remo?= =?UTF-8?q?ve=20console.log=20statement=20for=20keydown=20event=20in=20han?= =?UTF-8?q?dleKeyDown=20function=20=F0=9F=90=9B=20fix(reactflowUtils.ts):?= =?UTF-8?q?=20fix=20handleKeyDown=20function=20to=20properly=20handle=20sp?= =?UTF-8?q?ecial=20characters=20and=20backspace=20key?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/src/utils/reactflowUtils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/frontend/src/utils/reactflowUtils.ts b/src/frontend/src/utils/reactflowUtils.ts index ae7de3f0d..6f18520c4 100644 --- a/src/frontend/src/utils/reactflowUtils.ts +++ b/src/frontend/src/utils/reactflowUtils.ts @@ -236,7 +236,8 @@ export function addVersionToDuplicates(flow: FlowType, flows: FlowType[]) { export function handleKeyDown(e: React.KeyboardEvent, inputValue: string | string[] | null, block: string) { - + console.log("check key: ", e); + if (typeof inputValue === "string" && e.ctrlKey && e.key === "Backspace" && (inputValue === block || inputValue?.charAt(inputValue?.length - 1) === ' ' || specialCharsRegex.test(inputValue?.charAt(inputValue?.length - 1))