From 8642c451c7ab2c9579f0d9655d3190482821fa19 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Sun, 31 Mar 2024 04:07:34 +0300 Subject: [PATCH] Fixed bug on chatinput --- .../src/modals/IOModal/components/chatView/chatInput/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/src/modals/IOModal/components/chatView/chatInput/index.tsx b/src/frontend/src/modals/IOModal/components/chatView/chatInput/index.tsx index 52af7a987..21f7f1faf 100644 --- a/src/frontend/src/modals/IOModal/components/chatView/chatInput/index.tsx +++ b/src/frontend/src/modals/IOModal/components/chatView/chatInput/index.tsx @@ -26,7 +26,7 @@ export default function ChatInput({ }, [lockChat, inputRef]); useEffect(() => { - if (inputRef.current) { + if (inputRef.current && inputRef.current.scrollHeight !== 0) { inputRef.current.style.height = "inherit"; // Reset the height inputRef.current.style.height = `${inputRef.current.scrollHeight}px`; // Set it to the scrollHeight }