Skip to content

textarea and input ignore lineHeight and fontSize, the row is always 26px #63

Description

@xyaman

lineHeight is part of the shared Style interface, so TypeScript accepts it on <textarea> and <input>. But those elements ignore it. The row is always 26px, and changing fontSize doesn't change it either.

I tested this with @gpuix/react and @gpuix/native 0.7.0 on macOS arm64, with the native module built from cbc3de0, using createTestRoot and getElementBounds:

Property Values I tried Box height
lineHeight 16, 18, 20, 24, unset 26px (1 row), 78px (3 rows)
fontSize 10, 12, 14, 16, 20, 28 26px
height 20, 22, 26, 30 works as expected

Only an explicit height changes the box, but it also overrides minRows and maxRows, so a composer that grows with its content can't use it.

This is also different from <code>, where the docs say rows scale with fontSize.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions