Undo removes pre-existing, already saved content
Currently on master, to reproduce:. edit a post that already has some pre-existing content, for example a simple title and text:
Add something to the title, and add something to the text:
Press the "Undo" button: all the paragraph text gets removed:
In this example. it should remove just Hello.
@afercia I can no longer replicate this on master, currently works as you expect
@tg-ephox true, can't reproduce any longer. However, there's something that doesn't look right to me. In the same, simple, example above:
- I add the word "more" to the title
- I add the word "more" to the text block
- clicking undo:
- with just one click, the "more" in the text gets deleted all together
- at the second Undo click, the "e" in the title "more" gets deleted, and at the following clicks same: one letter at a time
@afercia that's because currently the text block is wrapping TinyMCE and the block only gets the new content once TinyMCE loses focus . So all changes made within TinyMCE will be captured as a single change in regard to redo/undo.
@tg-ephox thanks, now I understand the technical reason behind this.
However, the more I test undo / redo, the more I'm worried about potential content loss and any sort of breakage in the users editing flow.
I think the current behavior is confusing and it's also very different from the behavior in the classic editor. Probably a bit overlooked so far, but I feel this is one of the features that should be definitely improved.
Should this get closed by #4956
Undo has undergone significant changes lately. Specific issues should be addressed individually.
For the title "one character at a time", this is tracked at #4057