Ticket #5435: 5435.patch
File 5435.patch, 2.3 KB (added by , 13 years ago) |
---|
-
_source/plugins/list/plugin.js
438 438 while ( ranges.length > 0 ) 439 439 { 440 440 range = ranges.shift(); 441 442 var boundaryNodes = range.getBoundaryNodes(),443 startNode = boundaryNodes.startNode,444 endNode = boundaryNodes.endNode;445 446 if ( startNode.type == CKEDITOR.NODE_ELEMENT && startNode.getName() == 'td' )447 range.setStartAt( boundaryNodes.startNode, CKEDITOR.POSITION_AFTER_START );448 449 if ( endNode.type == CKEDITOR.NODE_ELEMENT && endNode.getName() == 'td' )450 range.setEndAt( boundaryNodes.endNode, CKEDITOR.POSITION_BEFORE_END );451 452 441 var iterator = range.createIterator(), 453 442 block; 454 443 -
_source/plugins/domiterator/plugin.js
51 51 if ( !this._.lastNode ) 52 52 { 53 53 range = this.range.clone(); 54 55 // Shrink the range to exclude harmful "noises" (#4087, #4450, #5435). 56 range.shrink( CKEDITOR.NODE_ELEMENT, true ); 57 54 58 range.enlarge( this.forceBrBreak || !this.enlargeBr ? 55 59 CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS : CKEDITOR.ENLARGE_BLOCK_CONTENTS ); 56 60 … … 212 216 213 217 // We have found a block boundary. Let's close the range and move out of the 214 218 // loop. 215 if ( ( closeRange || isLast ) && range ) 216 { 217 var boundaryNodes = range.getBoundaryNodes(), 218 startPath = new CKEDITOR.dom.elementPath( range.startContainer ); 219 220 // Drop the range if it only contains bookmark nodes, and is 221 // not because of the original collapsed range. (#4087,#4450) 222 if ( boundaryNodes.startNode.getParent().equals( startPath.blockLimit ) 223 && isBookmark( boundaryNodes.startNode ) && isBookmark( boundaryNodes.endNode ) ) 224 { 225 range = null; 226 this._.nextNode = null; 227 } 228 else 219 if ( isLast || ( closeRange && range ) ) 229 220 break; 230 221 } 231 222 232 if ( isLast )233 break;234 235 }236 237 223 // Now, based on the processed range, look for (or create) the block to be returned. 238 224 if ( !block ) 239 225 {