Ticket #3473: 3473.patch
File 3473.patch, 1.9 KB (added by , 15 years ago) |
---|
-
_source/core/dom/element.js
239 239 var lastChild = this.getLast() ; 240 240 241 241 // Ignore empty/spaces text. 242 while ( lastChild && lastChild.type == CKEDITOR.NODE_TEXT && !CKEDITOR.tools.rtrim( lastChild.getText() ) ) 242 while ( lastChild && lastChild.type == CKEDITOR.NODE_TEXT 243 && !CKEDITOR.tools.rtrim( lastChild.getText() || '' ) ) 243 244 lastChild = lastChild.getPrevious(); 244 245 245 if ( !lastChild || ( lastChild.is && ( !lastChild.is( 'br' ) || !lastChild.getAttribute( '_cke_bogus' ) ) ) ) 246 // Padding br already existed? 247 if ( !lastChild || ( lastChild.is && !lastChild.is( 'br' ) ) ) 246 248 { 247 this.append(248 CKEDITOR.env.opera ?249 this.getDocument().createText('') :250 249 // See whether the block has some line content, 250 // empty spaces are ingnored since it's unable to establish line height. 251 if ( !CKEDITOR.tools.trim( this.getText() || '' ) ) 252 this.append( this.getDocument().createElement( 'br', { attributes : { _cke_bogus : 1 } } ) ); 251 253 } 252 254 }, 253 255 … … 666 668 { 667 669 return this.$.style[ CKEDITOR.tools.cssStyleToDomStyle( name ) ]; 668 670 }, 669 671 670 672 /** 671 673 * Checks if the element name matches one or more names. 672 674 * @param {String} name[,name[,...]] One or more names to be checked. … … 1165 1167 if ( CKEDITOR.env.gecko && !CKEDITOR.env.quirks ) 1166 1168 { 1167 1169 x += this.$.clientLeft ? 1 : 0; 1168 y += this.$.clientTop ? 1 : 0; ;1170 y += this.$.clientTop ? 1 : 0; 1169 1171 } 1170 1172 1171 1173 return { x : x, y : y }; … … 1354 1356 getChildCount : function() 1355 1357 { 1356 1358 return this.$.childNodes.length; 1357 }, 1358 1359 } 1359 1360 });