diff --git a/app/components/chat.tsx b/app/components/chat.tsx index 90c88d97..a8b53fea 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -421,6 +421,7 @@ export function Chat(props: { // check if should send message const onInputKeyDown = (e: React.KeyboardEvent) => { if (shouldSubmit(e)) { + setAutoScroll(true); onUserSubmit(); e.preventDefault(); } @@ -667,7 +668,7 @@ export function Chat(props: { onInput={(e) => onInput(e.currentTarget.value)} value={userInput} onKeyDown={onInputKeyDown} - onFocus={() => setAutoScroll(true)} + onFocus={() => setAutoScroll(isMobileScreen())} onBlur={() => { setAutoScroll(false); setTimeout(() => setPromptHints([]), 500);