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.
- Open any sample with CKEditor. (i.e. samples/replacebyclass.html)
- Go to JavaScript console, and enter following code:
CKEDITOR.instances.editor1.fire( 'lockSnapshot', { dontUpdate: true } ); CKEDITOR.instances.editor1.fire( 'lockSnapshot', { dontUpdate: true } );
- That should result with UndoManager lock counter being increased to
2
, confirm that by evaluating:
CKEDITOR.instances.editor1.undoManager.locked.level
- 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:
- Good news is that it seems not to be recent regression, as I've checked 4.3.0 and the same error occurs there.
- Commands do cares about UndoManager being locked, because if you'll perform bold or any other command it will not record snapshot.