Opened 9 years ago

Closed 9 years ago

#12838 closed Bug (expired)

Saving undo images does not account for changes done when firing the 'change' event.

Reported by: kxiao Owned by:
Priority: Normal Milestone:
Component: Core : Undo & Redo Version:
Keywords: Cc:


When the change event is fired, if the receiving function changes the text in any way, the UndoManager does not update the save image to the changed version. Therefore, it saves the version before the change was fired, which is the incorrect version for the snapshot.

Steps to reproduce (not necessary, submitting pull request for fix to ckeditor-dev Github repo):

  1. Create an onChange function that receives the 'change' event and edits the text when executed
  2. Make a change that would trigger the event with the correct parameters to edit the text
  3. Try to undo the change

Expected: Will undo the change Actual: Undo only reverts to intermediate step (which may or may not trigger the onChange event again)

Change History (2)

comment:1 Changed 9 years ago by Jakub Ś

Status: newpending
Version: 4.4.5

I could not reproduce this.

Could you perhaps provide sample code that I could put into sample page (like replacebycode.html) of default editor and would see this issue?

comment:2 Changed 9 years ago by Piotrek Koszuliński

Resolution: expired
Status: pendingclosed
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy