Changes between Initial Version and Version 1 of Ticket #12354, comment 5


Ignore:
Timestamp:
Aug 28, 2014, 10:22:54 AM (10 years ago)
Author:
Artur Delura
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12354, comment 5

    initial v1  
    44
    55In theory snapshot should be created here, but is that good behaviour? State of editor is like that: {{{<p>a^</p>}}} but snapshot is {{{<p>aa</p>}}}. As result we can press {{{Crtl + Z}}} and snapshot last will be restored. So I think that we shouldn't create snapshot yet but it should be created after 25 + 1 keyDown`s. And calling method {{{type}}} In {{{keyDown}}} callback make sense here because in this callback is called before any DOM modifications, so state will be saved from 25 keyDown. And everything will work fine.
     6
     7Btw. {{{type}}} method was called after DOM modifications, but it saved snapshot before modifications. See [https://github.com/ckeditor/ckeditor-dev/blob/master/plugins/undo/plugin.js#L289-L292 this], so this is another argument why it should be called in {{{keyDown}}} callback.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy