Opened 15 years ago
Closed 15 years ago
#5191 closed Bug (fixed)
Ajax sample: undo behaves improperly
Reported by: | Frederico Caldeira Knabben | Owned by: | Alfonso Martínez de Lizarrondo |
---|---|---|---|
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 (1)
Change History (4)
Changed 15 years ago by
Attachment: | 5191.patch added |
---|
comment:1 Changed 15 years ago by
Keywords: | Review? added |
---|---|
Owner: | set to Alfonso Martínez de Lizarrondo |
Status: | new → assigned |
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 15 years ago by
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.
Proposed patch