Skip to content

fix: account for word-spacing in TextArea autoSize - #210

Draft
wozhenbang2004 wants to merge 2 commits into
react-component:masterfrom
wozhenbang2004:fix-textarea-word-spacing
Draft

wozhenbang2004 wants to merge 2 commits into
react-component:masterfrom
wozhenbang2004:fix-textarea-word-spacing

Conversation

@wozhenbang2004

@wozhenbang2004 wozhenbang2004 commented Nov 12, 2026 •

Copy link
Copy Markdown

Copy word-spacing to the hidden textarea so autoSize measures the same line wrapping as the visible textarea.

Added regression coverage for positive, negative, and normal word spacing. Tests, lint, type check, compile and build pass.

Fixes #209

Chrome reproduction of the height calculation in isolation, with the same text and styles before and after the fix:

textarea-word-spacing-clean

@vercel

vercel Bot commented Nov 12, 2026

Copy link
Copy Markdown

@wozhenbang2004 is attempting to deploy a commit to the afc163's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Pre-merge checks: Passed 1 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Title check Pending This assessment has not completed. The check will be retried on the next pre-merge check run.
Passed Passed checks: 1 passed

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TextArea autoSize does not account for word-spacing

1 participant