|
@@ -421,6 +421,7 @@ export function Chat(props: {
|
|
// check if should send message
|
|
// check if should send message
|
|
const onInputKeyDown = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {
|
|
const onInputKeyDown = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {
|
|
if (shouldSubmit(e)) {
|
|
if (shouldSubmit(e)) {
|
|
|
|
+ setAutoScroll(true);
|
|
onUserSubmit();
|
|
onUserSubmit();
|
|
e.preventDefault();
|
|
e.preventDefault();
|
|
}
|
|
}
|
|
@@ -667,7 +668,7 @@ export function Chat(props: {
|
|
onInput={(e) => onInput(e.currentTarget.value)}
|
|
onInput={(e) => onInput(e.currentTarget.value)}
|
|
value={userInput}
|
|
value={userInput}
|
|
onKeyDown={onInputKeyDown}
|
|
onKeyDown={onInputKeyDown}
|
|
- onFocus={() => setAutoScroll(true)}
|
|
|
|
|
|
+ onFocus={() => setAutoScroll(isMobileScreen())}
|
|
onBlur={() => {
|
|
onBlur={() => {
|
|
setAutoScroll(false);
|
|
setAutoScroll(false);
|
|
setTimeout(() => setPromptHints([]), 500);
|
|
setTimeout(() => setPromptHints([]), 500);
|