Opened 5 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 | 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)
Change History (7)
#1
@
5 years ago
#3
@
5 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
@
5 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
@
5 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
@
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
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?