Ticket #7742: 7742.patch
File 7742.patch, 1.1 KB (added by , 13 years ago) |
---|
-
_source/plugins/selection/plugin.js
78 78 && node.getName() in CKEDITOR.dtd.$removeEmpty; 79 79 } 80 80 81 function singletonBlock( node ) 82 { 83 var body = range.document.getBody(); 84 return !node.is( 'body' ) && body.getChildCount() == 1; 85 } 86 81 87 var start = range.startContainer, 82 88 offset = range.startOffset; 83 89 … … 86 92 87 93 // 1. Empty inline element. <span>^</span> 88 94 // 2. Adjoin to inline element. <p><strong>text</strong>^</p> 89 return !CKEDITOR.tools.trim( start.getHtml() ) ? isInlineCt( start ) : isInlineCt( start.getChild( offset - 1 ) ) || isInlineCt( start.getChild( offset ) ); 95 // 3. The only empty block in document. <body><p>^</p></body> (#7222) 96 return !CKEDITOR.tools.trim( start.getHtml() ) ? isInlineCt( start ) || singletonBlock( start ) 97 : isInlineCt( start.getChild( offset - 1 ) ) || isInlineCt( start.getChild( offset ) ); 90 98 } 91 99 92 100 var selectAllCmd =