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

CMD + OPTOIN + SHIFT + M not exiting code editor #49841

Open
alvarotrigo opened this issue Apr 14, 2023 · 2 comments
Open

CMD + OPTOIN + SHIFT + M not exiting code editor #49841

alvarotrigo opened this issue Apr 14, 2023 · 2 comments
Labels
[Package] Editor /packages/editor [Package] Keyboard Shortcuts /packages/keyboard-shortcuts [Type] Enhancement A suggestion for improvement.

Comments

@alvarotrigo
Copy link

Description

The combination of keys to show the code editor is the same as the one to exit it.
CMD + OPTOIN + SHIFT + M (on Mac)

image

If you use it to enter into the code view and you hit the exact key combination again, it won't exit it.
It forces you to first focus the editor so you have to click with the mouse somewhere and then hit the keys.

I feel like this shouldn't behave this way.
The editor should be focused by default when changing the view so we can use the key combination and toggle between both views faster.

Step-by-step reproduction instructions

  1. Create a blog post
  2. Hit CMD + OPTOIN + SHIFT + M to enter into the code view
  3. Try to hit again CMD + OPTOIN + SHIFT + M to exit it

Notice it won't work unless you click somewhere on the editor before hitting CMD + OPTOIN + SHIFT + M again.

Screenshots, screen recording, code snippet

No response

Environment info

No response

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

Yes

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

Yes

@Thelmachido
Copy link

I was able to replicate this, if you don't click around the code editor the shortcut doesn't work.

Enviroment

WordPress 6.2
Gutenberg 15.5.1
TT3 theme

@Thelmachido Thelmachido added [Type] Enhancement A suggestion for improvement. [Package] Editor /packages/editor labels Apr 14, 2023
@Mamaduka
Copy link
Member

This is a known limitation; the editor area should have a focus so that the keyboard shortcuts work. See #45151 (comment).

We might want to open a general issue to consider two options @youknowriad mentioned. The new issue also can be used as a reference for future reports.

@ellatrix ellatrix added the [Package] Keyboard Shortcuts /packages/keyboard-shortcuts label Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Editor /packages/editor [Package] Keyboard Shortcuts /packages/keyboard-shortcuts [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

4 participants