Ticket #8222: 8222.patch
File 8222.patch, 2.0 KB (added by , 13 years ago) |
---|
-
_source/plugins/wysiwygarea/plugin.js
398 398 && !pathBlock.is( 'pre' ) 399 399 && !pathBlock.getBogus() ) 400 400 { 401 editor.fire( 'updateSnapshot' );402 restoreDirty( editor );403 401 pathBlock.appendBogus(); 404 402 } 405 403 } … … 412 410 && blockLimit.getName() == 'body' 413 411 && !path.block ) 414 412 { 415 editor.fire( 'updateSnapshot' );416 restoreDirty( editor );417 CKEDITOR.env.ie && restoreSelection( selection );418 419 413 var fixedBlock = range.fixBlock( true, 420 414 editor.config.enterMode == CKEDITOR.ENTER_DIV ? 'div' : 'p' ); 421 415 … … 464 458 var testPath = new CKEDITOR.dom.elementPath( testRange.startContainer ); 465 459 if ( !testPath.blockLimit.is( 'body') ) 466 460 { 467 editor.fire( 'updateSnapshot' );468 restoreDirty( editor );469 CKEDITOR.env.ie && restoreSelection( selection );470 471 461 var paddingBlock; 472 462 if ( enterMode != CKEDITOR.ENTER_BR ) 473 463 paddingBlock = body.append( editor.document.createElement( enterMode == CKEDITOR.ENTER_P ? 'p' : 'div' ) ); … … 1125 1115 editor.on( 'insertElement', onInsert( doInsertElement ), null, null, 20 ); 1126 1116 editor.on( 'insertText', onInsert( doInsertText ), null, null, 20 ); 1127 1117 // Auto fixing on some document structure weakness to enhance usabilities. (#3190 and #3189) 1128 editor.on( 'selectionChange', onSelectionChangeFixBody, null, null, 1 ); 1118 editor.on( 'selectionChange', function() 1119 { 1120 editor.fire( 'updateSnapshot' ); 1121 var sel = editor.getSelection(); 1122 // Do it only when selection is not locked. (#8222) 1123 if ( sel && !sel.isLocked ) 1124 { 1125 var isDirty = editor.checkDirty(); 1126 onSelectionChangeFixBody.apply( this, arguments ); 1127 !isDirty && editor.resetDirty(); 1128 } 1129 }, null, null, 1 ); 1129 1130 }); 1130 1131 1131 1132 var titleBackup;