diff --git a/app/components/chat.tsx b/app/components/chat.tsx index 7929bf90..8fc39e31 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -368,7 +368,7 @@ export function Chat() { const [isLoading, setIsLoading] = useState(false); const { submitKey, shouldSubmit } = useSubmitHandler(); const { scrollRef, setAutoScroll, scrollToBottom } = useScrollToBottom(); - const [hitBottom, setHitBottom] = useState(false); + const [hitBottom, setHitBottom] = useState(true); const isMobileScreen = useMobileScreen(); const navigate = useNavigate(); diff --git a/app/utils.ts b/app/utils.ts index efcd4729..95bbed2c 100644 --- a/app/utils.ts +++ b/app/utils.ts @@ -138,7 +138,7 @@ export function autoGrowTextArea(dom: HTMLTextAreaElement) { const width = getDomContentWidth(dom); measureDom.style.width = width + "px"; - measureDom.innerHTML = dom.value.trim().length > 0 ? dom.value : "1"; + measureDom.innerText = dom.value.trim().length > 0 ? dom.value : "1"; const lineWrapCount = Math.max(0, dom.value.split("\n").length - 1); const height = parseFloat(window.getComputedStyle(measureDom).height);