diff --git a/app/components/chat.tsx b/app/components/chat.tsx index 0f1bad64..047607d4 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -927,6 +927,9 @@ export function Chat() { onBlur={() => setAutoScroll(false)} rows={inputRows} autoFocus={autoFocus} + style={{ + fontSize: config.fontSize, + }} /> } diff --git a/app/utils.ts b/app/utils.ts index 120b1e15..c083c34f 100644 --- a/app/utils.ts +++ b/app/utils.ts @@ -152,6 +152,7 @@ export function autoGrowTextArea(dom: HTMLTextAreaElement) { const width = getDomContentWidth(dom); measureDom.style.width = width + "px"; measureDom.innerText = dom.value !== "" ? dom.value : "1"; + measureDom.style.fontSize = dom.style.fontSize; const endWithEmptyLine = dom.value.endsWith("\n"); const height = parseFloat(window.getComputedStyle(measureDom).height); const singleLineHeight = parseFloat(