Skip to content

TextArea autoSize does not account for word-spacing #209

Open

Description

@wozhenbang2004

The textarea used to measure autoSize does not copy word-spacing. With custom word spacing, it can measure fewer lines than the visible textarea and leave it too short.

For example, text in a 280px textarea with 16px monospace font, 24px line height and 8px word-spacing needs three lines, but the calculation returns a two-line height.

Adding word-spacing to SIZING_STYLE changes the measured height from 58px to 82px in this case.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions