Skip to content

Commit

Permalink
Merge pull request ChatGPTNextWeb#2107 from Yidadaa/bugfix-0623
Browse files Browse the repository at this point in the history
fix: ChatGPTNextWeb#2087 chat box font size use global config
  • Loading branch information
Yidadaa authored Jun 23, 2023
2 parents b941be8 + 95293cb commit 8d81c5e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/components/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -927,6 +927,9 @@ export function Chat() {
onBlur={() => setAutoScroll(false)}
rows={inputRows}
autoFocus={autoFocus}
style={{
fontSize: config.fontSize,
}}
/>
<IconButton
icon={<SendWhiteIcon />}
Expand Down
1 change: 1 addition & 0 deletions app/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 8d81c5e

Please sign in to comment.