Skip to content

fix: Ensure deterministic height adjustment in handleKeydown#1863

Closed
calycekr wants to merge 1 commit intohuggingface:mainfrom
calycekr:patch-6
Closed

fix: Ensure deterministic height adjustment in handleKeydown#1863
calycekr wants to merge 1 commit intohuggingface:mainfrom
calycekr:patch-6

Conversation

@calycekr
Copy link
Contributor

@calycekr calycekr commented Jul 4, 2025

This PR improves the fix introduced in #1854 by ensuring the textarea height adjustment completes deterministically after the submit event is dispatched.

Previously, there was a race condition where the textarea height adjustment could be scheduled but not applied before submission, leading to inconsistent UI behavior.

Changes:

  • Improved the existing logic by tick().then() in handleKeydown ensuring DOM updates are applied after the submit event is dispatched.

Fixes: #1854

Improved the existing logic by `tick().then()` in `handleKeydown` ensuring DOM updates are applied after the submit event is dispatched.
@rtrompier rtrompier force-pushed the main branch 4 times, most recently from d147fec to 4d98b15 Compare November 4, 2025 17:37
@gary149
Copy link
Collaborator

gary149 commented Jan 20, 2026

ty reworked it

@gary149 gary149 closed this Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants