diff --git a/src/frontend/src/modals/IOModal/components/chatView/chatInput/components/textAreaWrapper/index.tsx b/src/frontend/src/modals/IOModal/components/chatView/chatInput/components/textAreaWrapper/index.tsx index 0a9ba4a7e..e34469b6c 100644 --- a/src/frontend/src/modals/IOModal/components/chatView/chatInput/components/textAreaWrapper/index.tsx +++ b/src/frontend/src/modals/IOModal/components/chatView/chatInput/components/textAreaWrapper/index.tsx @@ -1,3 +1,4 @@ +import { useEffect } from "react"; import { Textarea } from "../../../../../../../components/ui/textarea"; import { classNames } from "../../../../../../../utils/utils"; @@ -43,6 +44,12 @@ const TextAreaWrapper = ({ const additionalClassNames = "form-modal-lockchat pl-14"; + useEffect(() => { + if (!lockChat && !noInput && !saveLoading) { + inputRef.current?.focus(); + } + }, [lockChat, noInput, saveLoading]); + return (