-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Open
Description
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

• After backspacing lines but height not shrinking)

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
Labels
No labels