Ticket #5191 (closed Bug: fixed)

Opened 4 years ago

Last modified 4 years ago

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

  1. Load the Ajax sample.
  2. Type some text.
  3. Undo until the last possible undo step.
  4. 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

5191.patch (1.4 KB) - added by alfonsoml 4 years ago.
Proposed patch

Change History

Changed 4 years ago by alfonsoml

Proposed patch

comment:1 Changed 4 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 4 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:
  1. Load the ajax sample.
  1. Type some text.
  1. Remove the editor and recreate it.
  1. Type more text after the current text.
  1. Undo everything last step. The contents is empty, which is wrong... we should have the initial contents.
  1. Redo everything. Nothings happens... the redo looks blocked.

comment:3 Changed 4 years ago by fredck

  • Status changed from assigned to closed
  • Resolution set to fixed

Fixed with [5163].

Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy