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

Block Editor: CTRL + S is not working anymore if the keyboard language is not English! #38230

Open
Elgameel opened this issue Jan 26, 2022 · 12 comments
Labels
[Package] Block editor /packages/block-editor [Type] Bug An existing feature does not function as intended

Comments

@Elgameel
Copy link

Description

After updating to version 5.9 the CTRL + S shortcut is no longer working if the keyboard language is not English.

If the keyboard language is set to English, it saves changes as usual, but If I switch keyboard language to another language (i.e. Arabic) the shortcut is not captured by WordPress, and the browser's save page as window appears instead.

Step-by-step reproduction instructions

  1. Open WordPress Block Editor.
  2. Switch keyboard language to Arabic.
  3. Press CTRL + S.

Screenshots, screen recording, code snippet

No response

Environment info

  • WordPress version: 5.9
  • Theme: Genesis child-theme
  • Browsers: Chrome version 97.0.4692.71 and Microsoft Edge version 97.0.1072.69
  • OS: Windows 11

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

@amustaque97 amustaque97 added [Package] Block editor /packages/block-editor Needs Testing Needs further testing to be confirmed. labels Jan 26, 2022
@annezazu
Copy link
Contributor

Wondering if this is related #38146

@Elgameel can you confirm this was working properly before 5.9?

@Elgameel
Copy link
Author

@annezazu
Yes, it was working before the update.

I was even writing a post when I received the update notification.

I saved the changes using the shortcut and updated WordPress, then I came back to continue writing when I found that the shortcut is not working anymore.

I opened a different browser, cleared all cache, tried different posts and the result is still the same!

@annezazu
Copy link
Contributor

Thanks so much for following up with more context!

@annezazu
Copy link
Contributor

I tried replicating this but was unable to:

Screen.Recording.2022-01-26.at.12.55.50.PM.mov

Flagging in core-test to see if we can get more help replicating!

@Elgameel
Copy link
Author

I have retested it on a different English WordPress site, a different Windows 10 PC, and I still have the same problem.

@ironprogrammer
Copy link
Contributor

I was unable to replicate this issue with the following test parameters:

  • OS: macOS Monterey (12.1)
  • Browsers: Safari and Chrome latest
  • Keyboard Input Sources: US, Colemak, Arabic, Arabic - QWERTY

Something that did come up, which I hadn't initially considered, is that the location of "S" can change between keyboard layouts. On the US keyboard S is the 2nd character key from the left in the middle row. However, in the Colemak layout, this shifts to the 3rd key from the left. For instance:

US Keyboard Layout
US Keyboard Layout

Colemak Keyboard
Colemak Keyboard Layout

So on Colemak, I needed to press Command + (3rd key from the left) to correctly Save.

Back to the Arabic layouts, I tried both the standard Arabic and "Arabic - QWERTY" input sources (out of the five available in macOS), but the primary (non-shifted) character in that 2nd position appears to remain the same: س. It appears, on macOS at least, that the mapping of "S" on these Arabic layouts is consistent with the 2nd position.

I think it would help to have some additional Windows 10/11 users test this out. I will also reach out to the #core-i18n team to find out if 5.9 introduced any changes to key codes that could be at play here.

@tellthemachines
Copy link
Contributor

I can replicate this on Windows 11, on both Chrome and Firefox, with the keyboard layout set to "Arabic (Bahrain)". Instead of saving the post, Ctrl + S opens a "Save as" system dialog.

@tellthemachines tellthemachines added [Type] Bug An existing feature does not function as intended and removed Needs Testing Needs further testing to be confirmed. labels Jan 27, 2022
@annezazu
Copy link
Contributor

Moving this to the 5.9.x board just in case this can be tracked down :) Thank you all so much for helping test.

@Elgameel
Copy link
Author

Elgameel commented Jan 27, 2022

Update: it seems that all Editor keyboard shortcuts are not working too.

I can confirm that the following shortcuts are not working:

  • CTRL + Z.
  • CTRL + SHIFT + D
  • CTRL + K

@paaljoachim
Copy link
Contributor

Testing.

WP 5.9.1.
Norwegian input source.

Screenshot 2022-02-25 at 20 32 08

Theme: Just updated Twenty Twenty Two.
Plugins: None activated.
Chrome.
OSX 12.2.1
Local site running Desktop Server.

Creating a new page.
Adding a title and some text in the default Paragraph block.

CTRL (command) + Z = Undo works.
CTRL (command) + SHIFT + D = Duplicates current line content. Nice to know about this shortcut!
CTRL (command) + K = Open the Link control interface.

All 3 shortcuts worked on my Macbook Pro running OSX 12.2.1.
From @tellthemachines above comment it sounds like a Windows issue.

@ellatrix
Copy link
Member

Hi! Could you share what you see when you press S here?

https://www.toptal.com/developers/keycode

The most useful information would be under "Event dump"

@youknowriad
Copy link
Contributor

I've just tried with an arabic keyboard on Mac OS, Cmd + s work properly for me but Ctrl + S doesn't (note the capital S) in other words, the keyboard shortcut is Cmd + s and not Cmd + Shift + s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Block editor /packages/block-editor [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

8 participants