Ticket #5191 (closed Bug: fixed)
Ajax sample: undo behaves improperly
| Reported by: | fredck | Owned by: | alfonsoml |
|---|---|---|---|
| Priority: | Normal | Milestone: | CKEditor 3.2 |
| Component: | Core : Undo/Redo | Version: | SVN (CKEditor) - OLD |
| Keywords: | Confirmed Review- | Cc: |
Description
- Load the Ajax sample.
- Type some text.
- Undo until the last possible undo step.
- Redo until the last redo step.
In step 3, the last undo should be from a few text to blank contents.
In step 4, the last redo should restore the entire typed text.
Currently, the user looses the text when performing the above steps.
Attachments
Change History
Changed 3 years ago by alfonsoml
- Attachment 5191.patch added
comment:1 Changed 3 years ago by alfonsoml
- Status changed from new to assigned
- Keywords Review? added
- Owner set to alfonsoml
The problem is similar to #4622. There's a first snapshot done automatically with the initial code that happens to be "<br>", which is turned into "<p><br></p>", but that patch doesn't fix this situation.
I've adjusted the save function so that in case that it's doing it for a redo call, it checks also the next snapshot to verify if that matches the current content, and so skip the save.
comment:2 Changed 3 years ago by fredck
- Keywords Review- added; Review? removed
There are still issues:
- In the reported TC, there is an additional empty undo.
- It still breaks the contents in the following TC:
- Load the ajax sample.
- Type some text.
- Remove the editor and recreate it.
- Type more text after the current text.
- Undo everything last step. The contents is empty, which is wrong... we should have the initial contents.
- Redo everything. Nothings happens... the redo looks blocked.
Note: See
TracTickets for help on using
tickets.

Proposed patch