Opened 10 years ago

Last modified 10 years ago

#12635 confirmed Bug

Keyboard triggered snapshot doesn't respect undo lock — at Initial Version

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

Description

It seems that if I'll try to lock UndoManager for snapshots, keyboard events will trigger the snapshot anyawy.

  1. Open any sample with CKEditor. (i.e. samples/replacebyclass.html)
  2. Go to JavaScript console, and enter following code:
CKEDITOR.instances.editor1.fire( 'lockSnapshot', { dontUpdate: true } );
CKEDITOR.instances.editor1.fire( 'lockSnapshot', { dontUpdate: true } );
  1. That should result with UndoManager lock counter being increased to 2, confirm that by evaluating:
CKEDITOR.instances.editor1.undoManager.locked.level
  1. Type anything in the editable.

Expected result:
No snapshot should be created, until we'll unlock the UndoManager.

Current result:
Snapshots are created anyway.

Additional info:

  1. Good news is that it seems not to be recent regression, as I've checked 4.3.0 and the same error occurs there.
  2. Commands do cares about UndoManager being locked, because if you'll perform bold or any other command it will not record snapshot.

Change History (0)

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