Changes between Version 3 and Version 4 of Ticket #12324, comment 4
- Timestamp:
- Aug 22, 2014, 11:09:55 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #12324, comment 4
v3 v4 9 9 {{{<p>bar ^baz</p>}}} 10 10 11 Please confirm for now.12 13 11 Expected behaviour is that when we change selection after making changes then snapshot should be saved. But it does not save snapshot when we put caret at the beginning of node (see point 6 - here we put caret at the same beginning of paragraph). 14 12 15 Deeper investigation brings me here: 13 '''Deeper investigation brings me here:''' 16 14 17 15 Saving snapshot is handled [https://github.com/ckeditor/ckeditor-dev/blob/master/plugins/undo/plugin.js#L973-L978 here] But it's unreliable, because editable has margin on each side, so clicking in margin area does not fire click event, but change selection. 16 17 '''Proposed solution:''' 18 19 To cover 100% use case let's listen {{{selectionChange}}} event and in callback call {{{onNavigationKey}}} method. 20 21 {{{ 22 this.undoManager.editor.on( 'selectionChange', function() { 23 that.onNavigationKey(); 24 } ); 25 }}}