Ticket #8299: 8229_3.patch

File 8229_3.patch, 1.8 KB (added by Garry Yao, 13 years ago)
  • _source/plugins/wysiwygarea/plugin.js

     
    11041104                                        // Auto fixing on some document structure weakness to enhance usabilities. (#3190 and #3189)
    11051105                                        editor.on( 'selectionChange', function( evt )
    11061106                                        {
    1107                                                 CKEDITOR.tools.setTimeout( function() {
    1108                                                         var sel = editor.getSelection();
    1109                                                         // Do it only when selection is not locked. (#8222)
    1110                                                         if ( sel && !sel.isLocked )
    1111                                                         {
    1112                                                                 var isDirty = editor.checkDirty();
    1113                                                                 onSelectionChangeFixBody.call( this, evt );
    1114                                                                 editor.fire( 'updateSnapshot' );
    1115                                                                 !isDirty && editor.resetDirty();
    1116                                                         }
    1117                                                 }, 0, this );
     1107                                                var sel = editor.getSelection();
     1108                                                // Do it only when selection is not locked. (#8222)
     1109                                                if ( sel && !sel.isLocked )
     1110                                                {
     1111                                                        var isDirty = editor.checkDirty();
     1112                                                        editor.fire( 'saveSnapshot', { contentOnly : 1 } );
     1113                                                        onSelectionChangeFixBody.call( this, evt );
     1114                                                        editor.fire( 'updateSnapshot' );
     1115                                                        !isDirty && editor.resetDirty();
     1116                                                }
    11181117
    11191118                                        }, null, null, 1 );
    11201119                                });
  • _source/plugins/undo/plugin.js

     
    6464                        editor.on( 'afterCommandExec', recordCommand );
    6565
    6666                        // Save snapshots before doing custom changes.
    67                         editor.on( 'saveSnapshot', function()
     67                        editor.on( 'saveSnapshot', function( evt )
    6868                                {
    69                                         undoManager.save();
     69                                        undoManager.save( evt.data && evt.data.contentOnly );
    7070                                });
    7171
    7272                        // Registering keydown on every document recreation.(#3844)
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy