Fix: Focus inline reply textarea after generating suggestion - #877
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #877 +/- ##
=============================================
+ Coverage 78.40% 78.44% +0.04%
Complexity 2454 2454
=============================================
Files 104 104
Lines 9918 9925 +7
=============================================
+ Hits 7776 7786 +10
+ Misses 2142 2139 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
What?
Fixes an issue where the inline reply textarea fails to retain focus after an AI-suggested reply is generated.
Why?
Previously, when a reply suggestion was generated, the code attempted to focus the textarea while the reply form was still disabled. Because of this the focus was lost.
How?
textarea.focus()call from thepopulateReplyTextareafunction.textarea.focus()call to therunGenerationfunction. This ensures the textarea is re-enabled and interactive before attempting to set focus to it.Use of AI Tools
AI assistance: Yes
Tool(s): Claude
Model(s): Sonnet 4.6
Used for: Code review, PR description
Testing Instructions
Changelog Entry
Before
Screen.Recording.2026-07-17.at.9.43.10.AM.mov
After
Screen.Recording.2026-07-17.at.9.42.24.AM.mov