From 4bf47ecf90ee103dccfd6f024943cbe7b39a25f9 Mon Sep 17 00:00:00 2001 From: Baptiste Arnaud Date: Sat, 10 Sep 2022 14:32:14 +0200 Subject: [PATCH] :bug: (textinput) Don't submit on enter when long input --- .../components/ChatGroup/ChatBlock/inputs/TextForm/TextForm.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/bot-engine/src/components/ChatGroup/ChatBlock/inputs/TextForm/TextForm.tsx b/packages/bot-engine/src/components/ChatGroup/ChatBlock/inputs/TextForm/TextForm.tsx index 52ef64663..92f0d147b 100644 --- a/packages/bot-engine/src/components/ChatGroup/ChatBlock/inputs/TextForm/TextForm.tsx +++ b/packages/bot-engine/src/components/ChatGroup/ChatBlock/inputs/TextForm/TextForm.tsx @@ -51,6 +51,7 @@ export const TextForm = ({ } const submitWhenEnter = (e: React.KeyboardEvent) => { + if (block.type === InputBlockType.TEXT && block.options.isLong) return if (e.key === 'Enter') submit() }