diff --git a/src/frontend/src/modals/chatModal/chatInput/index.tsx b/src/frontend/src/modals/chatModal/chatInput/index.tsx index 03be27cdb..5f02979ca 100644 --- a/src/frontend/src/modals/chatModal/chatInput/index.tsx +++ b/src/frontend/src/modals/chatModal/chatInput/index.tsx @@ -10,6 +10,15 @@ export default function ChatInput({ setChatValue, inputRef, }) { + useEffect(() => { + if (!lockChat && inputRef.current) { + inputRef.current.focus(); + } + },[ + lockChat,inputRef + ]) + + useEffect(() => { if (inputRef.current) { inputRef.current.style.height = "inherit"; // Reset the height