Skip to content

Editor loses focus after keyboard shortcut to switch to code editor #42145

@MatzeKitt

Description

@MatzeKitt

Description

If I swith to the code editor via keyboard shortcut, I cannot switch right back afterwards via keyboard shortcut, since the editor loses the focus. I need to click inside the code editor to switch back to the visual editor.

If the more menu is open on the upper right corner of the editor, I can switch between both editors with keyboard shortcuts every time.

Step-by-step reproduction instructions

  1. Open a post/page edit page in the backend.
  2. Click into the editor to get focus.
  3. Press the keyboard shortcut to switch to the code editor.
  4. Press the same keyboard shortcut again.

Screenshots, screen recording, code snippet

No response

Environment info

WordPress 6.0
No Gutenberg plugin installed
Safari 15.5
macOS 12.4

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] Code EditorHandling the code view of the editing experience[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions