Ticket #7041: 7041_2.patch
File 7041_2.patch, 2.7 KB (added by , 13 years ago) |
---|
-
_source/core/dom/element.js
254 254 }, 255 255 256 256 /** 257 * Retrieve block element's filler node if existed.258 */259 getBogus : function()260 {261 if ( !this.isBlockBoundary() )262 return null;263 264 var lastChild = this.getLast();265 266 // Ignore empty/spaces text.267 while ( lastChild && lastChild.type == CKEDITOR.NODE_TEXT268 && !CKEDITOR.tools.rtrim( lastChild.getText() ) )269 lastChild = lastChild.getPrevious();270 271 if ( lastChild &&272 ( CKEDITOR.env.ie && lastChild.type == CKEDITOR.NODE_TEXT273 && CKEDITOR.tools.trim( lastChild.getText() ).match( /^(?: |\xa0)$/ )274 || CKEDITOR.env.gecko && CKEDITOR.env.webkit && lastChild.is( 'br' ) ) )275 {276 return lastChild;277 }278 279 return null;280 },281 282 /**283 257 * Breaks one of the ancestor element in the element position, moving 284 258 * this element between the broken parts. 285 259 * @param {CKEDITOR.dom.element} parent The anscestor element to get broken. -
_source/plugins/wysiwygarea/plugin.js
357 357 body = editor.document.getBody(), 358 358 enterMode = editor.config.enterMode; 359 359 360 CKEDITOR.env.gecko && activateEditing( editor ); 360 if ( CKEDITOR.env.gecko ) 361 { 362 activateEditing( editor ); 361 363 364 // Ensure bogus br could help to move cursor (out of styles) to the end of block. (#7041) 365 var pathBlock = path.block || path.blockLimit; 366 if ( pathBlock && !pathBlock.getBogus() ) 367 pathBlock.appendBogus(); 368 } 369 362 370 // When enterMode set to block, we'll establing new paragraph only if we're 363 371 // selecting inline contents right under body. (#3657) 364 372 if ( enterMode != CKEDITOR.ENTER_BR -
_source/core/dom/range.js
1068 1068 if ( commonReached ) 1069 1069 endTop = enlargeable; 1070 1070 else if ( enlargeable ) 1071 this.setEndAfter( enlargeable ); 1072 } 1071 { 1072 var bogus = enlargeable.isBlockBoundary() && enlargeable.getBogus(); 1073 1074 // Exclude bogus <br /> at the end of block. 1075 if ( bogus ) 1076 this.setEndBefore( bogus ); 1077 else 1078 this.setEndAfter( enlargeable ); 1079 } 1080 } 1073 1081 1074 1082 sibling = enlargeable.getNext(); 1075 1083 }