Make WordPress Core

Opened 14 months ago

Last modified 14 months ago

#47892 new defect (bug)

Changes lost when switching from code editor to visual editor

Reported by: jikamens Owned by:
Milestone: Awaiting Review Priority: normal
Severity: major Version: 5.2.2
Component: Editor Keywords: 2nd-opinion
Focuses: Cc:


  1. Start composing a new post.
  2. Enter some text in the visual editor.
  3. Switch to the code editor with ctrl-alt-shift-m.
  4. Make a change that should be visible in the visual editor, e.g., wrap <sup>...</sup> around some text to make it superscript.
  5. Switch back to the visual editor with ctrl-alt-shift-m.
  6. Observe that your change is not visible in the visual editor.
  7. Click Save Draft.
  8. Switch back to the code editor with ctrl-alt-shift-m.
  9. Observe that your change is gone.


Marking this "major" severity because it's a data loss bug.

Change History (2)

#1 @sebastienserre
14 months ago

  • Keywords 2nd-opinion added


I reproduced but I'm not sure this a bug as if you save the draft just after making your change in the code editor, then you won't lost.

#2 @jikamens
14 months ago

  1. "I'm not sure this is a bug because there's a completely undocumented workaround that no one could possibly know they need to do without first falling victim to the problem and losing data" is not a good take.
  1. I've used a lot of rich text editors that allow switching between rich text and code, and none of the others behaves this way.
  1. In fact, the old WordPress editor didn't behave this way, so this is a regression.
Note: See TracTickets for help on using tickets.