From cde48131e3349a5aed5d4276e76a769bd6aebf90 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Fri, 28 Apr 2023 17:59:23 -0300 Subject: [PATCH] fix bug on event prevent default --- src/frontend/src/components/chatComponent/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/src/components/chatComponent/index.tsx b/src/frontend/src/components/chatComponent/index.tsx index a4eae7f21..10d285ba9 100644 --- a/src/frontend/src/components/chatComponent/index.tsx +++ b/src/frontend/src/components/chatComponent/index.tsx @@ -14,8 +14,8 @@ export default function Chat({ flow }: ChatType) { const [open, setOpen] = useState(false); useEffect(() => { const handleKeyDown = (event: KeyboardEvent) => { - event.preventDefault() if ((event.key === "K"||event.key==="k") && (event.metaKey||event.ctrlKey)) { + event.preventDefault() setOpen(oldState=>!oldState); } };