Make WordPress Core

Opened 4 years ago

Closed 2 years ago

#49795 closed defect (bug) (reported-upstream)

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

Reported by: angelxube's profile angelxube Owned by:
Milestone: 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 4 years ago.

Download all attachments as: .zip

Change History (7)

#1 @Otto42
4 years ago

Switching with the kayboard 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?

Version 0, edited 4 years ago by Otto42 (next)

#2 @Otto42
4 years ago

  • Component changed from Gallery to Editor

#3 @afercia
4 years 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
4 years 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
4 years 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.

#6 @sabernhardt
2 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to reported-upstream
  • Status changed from new to closed

This report is moved to GitHub. If you have anything to add, please comment on the issue:
https://github.com/WordPress/gutenberg/issues/40575

Note: See TracTickets for help on using tickets.