Opened 7 years ago

Closed 7 years ago

#3871 closed Bug (fixed)

Undo resets Redo buffer when undoing to beginning

Reported by: damo Owned by: garry.yao
Priority: Must have (possibly next milestone) Milestone: CKEditor 3.0
Component: Core : Undo & Redo Version:
Keywords: IBM Confirmed Review+ Cc:

Description

The redo buffer is reset when using the undo feature all the way to the beginning.

To reproduce:

  1. Open nightly Ajax sample
  2. Add some text on a few lines
  3. Use undo until reaching the initial state
  4. Attempt to redo last undo

Result: Redo is enabled but does not have any more state

Expected: Redo should maintain state and allow redoing even after reaching the end of the undo stack

Attachments (3)

3871.patch (2.1 KB) - added by garry.yao 7 years ago.
3871_2.patch (2.1 KB) - added by garry.yao 7 years ago.
3871_3.patch (2.6 KB) - added by fredck 7 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 7 years ago by garry.yao

  • Keywords Confirmed added
  • Owner set to garry.yao
  • Status changed from new to assigned

comment:2 Changed 7 years ago by garry.yao

  • Keywords Review? added

The problem was due to incorrect snapshot saving logic which create one unreachable snapshot at the beginning of stack.

comment:3 Changed 7 years ago by garry.yao

  • Component changed from General to Core : Undo/Redo
  • Priority changed from Normal to High

Changed 7 years ago by garry.yao

comment:4 Changed 7 years ago by arczi

  • Keywords Review+ added; Review? removed
  • Summary changed from [IE7] Undo resets Redo buffer when undoing to beginning to Undo resets Redo buffer when undoing to beginning

comment:5 Changed 7 years ago by fredck

  • Keywords Review- added; Review+ removed
  • In the editingblock plugin, please fire the beforeModeUnload event at line 171. It may happen that the event is used to manipulate the data right before unloading it.
  • Coding style: please make it correct and consistent with the rest of the code. Also, the change at line 95 is not needed.

Changed 7 years ago by garry.yao

comment:6 Changed 7 years ago by garry.yao

  • Keywords Review? added; Review- removed

Changed 7 years ago by fredck

comment:7 Changed 7 years ago by fredck

  • Keywords Review+ added; Review? removed

Sometimes words are not enough to properly express your intentions. I've attached a new patch for it. Please go ahead committing it if it satisfy the ticket needs.

comment:8 Changed 7 years ago by garry.yao

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

Fixed with [3846] and [3847].

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