Ticket #3473: 3473_6.patch
File 3473_6.patch, 1.9 KB (added by , 15 years ago) |
---|
-
_source/core/dom/element.js
241 241 // Ignore empty/spaces text. 242 242 while ( lastChild && lastChild.type == CKEDITOR.NODE_TEXT && !CKEDITOR.tools.rtrim( lastChild.getText() ) ) 243 243 lastChild = lastChild.getPrevious(); 244 245 if ( !lastChild || ( lastChild.is && ( !lastChild.is( 'br' ) || !lastChild.getAttribute( '_cke_bogus' ) ) ) ) 244 if ( !lastChild || !lastChild.is || !lastChild.is( 'br' ) ) 246 245 { 247 246 this.append( 248 247 CKEDITOR.env.opera ? 249 248 this.getDocument().createText('') : 250 this.getDocument().createElement( 'br' , { attributes : { _cke_bogus : 1 } }) );249 this.getDocument().createElement( 'br' ) ); 251 250 } 252 251 }, 253 252 -
_source/plugins/enterkey/plugin.js
259 259 range.insertNode( lineBreak ); 260 260 261 261 // A text node is required by Gecko only to make the cursor blink. 262 // We need some text inside of it, so the bogus <br> is properly 263 // created. 262 264 if ( CKEDITOR.env.gecko ) 263 doc.createText( ' ' ).insertAfter( lineBreak );265 doc.createText( '\ufeff' ).insertAfter( lineBreak ); 264 266 265 267 // If we are at the end of a block, we must be sure the bogus node is available in that block. 266 268 if ( isEndOfBlock && !CKEDITOR.env.ie ) 267 269 lineBreak.getParent().appendBogus(); 268 270 271 // Now we can remove the text node contents, so the caret doesn't 272 // stop on it. 273 if ( CKEDITOR.env.gecko ) 274 lineBreak.getNext().$.nodeValue = ''; 275 269 276 // IE has different behavior regarding position. 270 277 if ( CKEDITOR.env.ie ) 271 278 range.setStartAt( lineBreak, CKEDITOR.POSITION_AFTER_END );