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

Changes to code editor lost when closing it with keyboard shortcut. #22007

Closed
pansamolot opened this issue Apr 30, 2020 · 3 comments
Closed

Changes to code editor lost when closing it with keyboard shortcut. #22007

pansamolot opened this issue Apr 30, 2020 · 3 comments
Labels
[Feature] Code Editor Handling the code view of the editing experience [Type] Bug An existing feature does not function as intended

Comments

@pansamolot
Copy link

pansamolot commented Apr 30, 2020

Describe the bug
You can switch between Code Editor and Visual Editor using either context menu (three dots menu in right up corner) or using Ctrl+Shift+Alt+M keyboard shortcut. If you use the other option then all changes that you enter to Code Editor will be lost permanently when you switch back to Visual Editor.

This is verified to be Edge browser-related bug only.

The changes are lost permanently. Meaning that text you've added, deleted or changed in Code Editor is not only not replicated in Visual Editor, but also, when you switch to Code Editor for second time, it is gone from there as well.

To reproduce
Steps to reproduce the behavior:

  1. Write any text in Visual Editor.
  2. Press Ctrl+Shift+Alt+M to go to Code Editor.
  3. Write some text in Code Editor.
  4. Press Ctrl+Shift+Alt+M again to go back to Visual Editor.
  5. See that changes made in Code Editor are not replicated in Visual Editor and are lost.

Expected behavior
Changes made in one editor should always be replicated in another one.

Editor version (please complete the following information):

  • WordPress version: 5.4.1
  • gutenberg plugin 8.0.0 (updated 5 minutes ago and validated that bug exists there).

Desktop (please complete the following information):

  • OS: Windows 10 Enterprise 1803
  • Browser Microsoft Edge
  • Version newest (Windows Update)

Verified that this is Edge-related bug only. I am able to replicate it in Edge on any PC that I have it installed, but I can't replicate it on other browser, i.e. Chrome (in Chrome switching editors using keyboard shortcut works just fine and content is updated on both sides).

@talldan talldan changed the title Changes to cod editor lost when closing it with keyboard shortcut. Changes to code editor lost when closing it with keyboard shortcut. May 1, 2020
@talldan talldan added [Feature] Code Editor Handling the code view of the editing experience [Type] Bug An existing feature does not function as intended labels May 1, 2020
@talldan
Copy link
Contributor

talldan commented May 1, 2020

Thanks for reporting this @pansamolot, I was able to reproduce the issue too.

@noisysocks
Copy link
Member

Reported here also: https://core.trac.wordpress.org/ticket/47892

@noisysocks
Copy link
Member

Duplicate of #9512.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Code Editor Handling the code view of the editing experience [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants