Skip to content

Bug - TextArea - autoResize height issue if parent has explicit height #11920

@mcoker

Description

@mcoker

Here's the issue - https://codesandbox.io/p/sandbox/vigilant-aryabhata-42n8xv?file=%2Findex.tsx

Looks like it's due to this line in setAutoHeight that resets the form control wrapper height to inherit when the function runs.

parent.style.setProperty('height', 'inherit');

If the form control wrapper's parent has an explicit height set, inherit will use whatever that parent's height is. You can also see the bug if you look at the full-page example for the autoresize textarea. The form control's parent has height: 100% (occupying the full viewport height), so the textarea is full height, too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Status

    Needs triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions