Ticket #5376: 5376.patch
File 5376.patch, 1.0 KB (added by , 14 years ago) |
---|
-
_source/plugins/enterkey/plugin.js
26 26 27 27 var doc = range.document; 28 28 29 // Exit the list when we're inside an empty list item block. (#5376) 30 if ( range.checkStartOfBlock() && range.checkEndOfBlock() ) 31 { 32 var path = new CKEDITOR.dom.elementPath( range.startContainer ), 33 block = path.block; 34 35 if ( block.is( 'li' ) || block.getParent().is( 'li' ) ) 36 { 37 editor.execCommand( 'outdent' ); 38 return; 39 } 40 } 41 29 42 // Determine the block element to be used. 30 43 var blockTag = ( mode == CKEDITOR.ENTER_DIV ? 'div' : 'p' ); 31 44 … … 80 93 } 81 94 else 82 95 { 83 84 if ( isStartOfBlock && isEndOfBlock && previousBlock.is( 'li' ) )85 {86 editor.execCommand( 'outdent' );87 return;88 }89 90 96 var newBlock; 91 97 92 98 if ( previousBlock )