Changes between Version 3 and Version 4 of Ticket #12324, comment 4


Ignore:
Timestamp:
Aug 22, 2014, 11:09:55 AM (11 years ago)
Author:
Artur Delura
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12324, comment 4

    v3 v4  
    99{{{<p>bar ^baz</p>}}}
    1010
    11 Please confirm for now.
    12 
    1311Expected 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).
    1412
    15 Deeper investigation brings me here:
     13'''Deeper investigation brings me here:'''
    1614
    1715Saving 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
     19To cover 100% use case let's listen {{{selectionChange}}} event and in callback call {{{onNavigationKey}}} method.
     20
     21{{{
     22this.undoManager.editor.on( 'selectionChange', function() {
     23    that.onNavigationKey();
     24} );
     25}}}
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy