Opened 11 months ago
Last modified 11 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: |
|
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)
Change History (6)
#3
@
11 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
@
11 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
@
11 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.
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?