diff --git a/src/components/InputBox/index.jsx b/src/components/InputBox/index.jsx index b49c791..89e8e5c 100644 --- a/src/components/InputBox/index.jsx +++ b/src/components/InputBox/index.jsx @@ -12,6 +12,10 @@ export function InputBox({ onSubmit, enabled }) { updateRefHeight(inputRef) }) + useEffect(() => { + if (enabled) inputRef.current.focus() + }, [enabled]) + const onKeyDown = (e) => { e.stopPropagation() if (e.keyCode === 13 && e.shiftKey === false) {