WordPress.org

Make WordPress Core

Opened 8 months ago

Last modified 8 months ago

#49795 new defect (bug)

Content loss when switching between code and visual editor with the keyboard shortcut (Ctrl+Shift+Alt+M)

Reported by: angelxube Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.4
Component: Editor Keywords:
Focuses: Cc:

Description

When using keyboard shortcut Ctrl+Shift+Alt+M to switch from code editor back to visual editor all text will be lost. Pressing top right link or switching throught options menu works without problem. I consider this as a bug, because user will lost any change he put to code editor unless he previously save his work or click on link "Back to the visual editor"

Attachments (1)

content loss switching mode..gif (111.4 KB) - added by afercia 8 months ago.

Download all attachments as: .zip

Change History (6)

#1 @Otto42
8 months ago

Switching with the keyboard doesn't seem to cause any loss for me. Are you using any plugins or add-ons? Can you disable these to try to find the cause of the problem?

Last edited 8 months ago by Otto42 (previous) (diff)

#2 @Otto42
8 months ago

  • Component changed from Gallery to Editor

#3 @afercia
8 months ago

I can reproduce on a clean 5.4 installation, for example when creating a new post. See attached GIF.

I'd expect content without Gutenberg comments to be transformed to a Classic Block or to more appropriate blocks when possible. Insted, there's a content loss.

#4 @afercia
8 months ago

  • Severity changed from minor to normal
  • Summary changed from Shortcut in Gutenber Switching between code and visual editor (Ctrl+Shift+Alt+M) to Content loss when switching between code and visual editor with the keyboard shortcut (Ctrl+Shift+Alt+M)

I wouldn't consider this a "minor" bug. Content loss is a serious bug.

#5 @Otto42
8 months ago

Okay, so I was able to reproduce it with that info. It appears that clicking anywhere outside of the content block makes it "stick" when you switch. It only loses content when you switch with the keyboard without ever leaving the text block.

Seemingly anything that causes that text box in the code editor to lose focus will save it, and then it will be there after the switch.

Note: See TracTickets for help on using tickets.