Skip to content

Bug Report: Textarea not resizing down after deleting lines (extra empty lines) #1589

@prateekbisht23

Description

@prateekbisht23

Describe the bug:

When typing multiple empty lines in the message input box, the textarea expands as expected. However, when deleting lines with backspace, the input box height does not shrink back immediately. Instead, it stays expanded until the cursor reaches the last typed character.

To Reproduce:

1.	Type a message with multiple new lines (press Shift+Enter several times).
2.	Notice that the input box height increases.
3.	Use backspace to delete lines.
4.	The input box height does not reduce while deleting lines until you reach the last line of text.

Expected behavior:

The input box should shrink immediately when lines are deleted, dynamically adjusting to the content height in both directions (expansion and shrinking).

Screenshots:

•	Expanded textarea after multiple lines
Image
•	After backspacing lines but height not shrinking)
Image

Environment:

•	OS: macOS 15.6
•	ChatGPT App Version: 1.2025.224

Additional context:

This seems related to how the textarea auto-resize logic is implemented. It might only be listening for input events when content grows, but not when shrinking.

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