Ticket #8299: 8299.patch

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

     
    11021102                                        editor.on( 'insertElement', onInsert( doInsertElement ), null, null, 20 );
    11031103                                        editor.on( 'insertText', onInsert( doInsertText ), null, null, 20 );
    11041104                                        // Auto fixing on some document structure weakness to enhance usabilities. (#3190 and #3189)
    1105                                         editor.on( 'selectionChange', function()
     1105                                        editor.on( 'selectionChange', function( evt )
    11061106                                        {
    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                                                         onSelectionChangeFixBody.apply( this, arguments );
    1113                                                         editor.fire( 'updateSnapshot' );
    1114                                                         !isDirty && editor.resetDirty();
    1115                                                 }
     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 );
     1118
    11161119                                        }, null, null, 1 );
    11171120                                });
    11181121
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy