Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit Post: Focus wrongly transitions to post title when toggling Visual/Code #14850

Closed
aduth opened this issue Apr 5, 2019 · 1 comment
Closed
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

Comments

@aduth
Copy link
Member

aduth commented Apr 5, 2019

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

  1. Navigate to Posts > Add New
  2. Click or otherwise activate the "More Options" menu
  3. Click or otherwise activate to switch to the inactive mode of "Visual Editor" or "Code Editor"
  4. Note that focus is now in the post title

Expected behavior

Focus should remain in the activated menu item.

Desktop:

  • OS: macOS Mojave 10.14.4
  • Browser: Chrome Version 73.0.3683.86 (Official Build) (64-bit)

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) .

@aduth aduth added [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Package] Edit Post /packages/edit-post labels Apr 5, 2019
@gziolo gziolo added 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 labels Apr 6, 2019
@aduth
Copy link
Member Author

aduth commented Nov 21, 2019

Fixed by #16874

@aduth aduth closed this as completed Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

2 participants