Edit Post: Focus wrongly transitions to post title when toggling Visual/Code #14850
Labels
[Focus] Accessibility (a11y)
Changes that impact accessibility and need corresponding review (e.g. markup changes).
Good First Issue
An issue that's suitable for someone looking to contribute for the first time
Needs Dev
Ready for, and needs developer efforts
[Package] Edit Post
/packages/edit-post
Previously: #14456 (comment)
Related: #14754
Describe the bug
When toggling between "Visual Editor" and "Code Editor" in the post editor's More Options menu for a new post, focus is unexpectedly transitioned to the title field.
To reproduce
Expected behavior
Focus should remain in the activated menu item.
Desktop:
Additional context
As noted at #14456 (comment), this has to do with how the post title becomes remounted and its
autoFocus
behavior takes effect. A work-in-progress solution is explored at #14456 (comment) .The text was updated successfully, but these errors were encountered: