Ticket #7359: 7359.patch
File 7359.patch, 1.4 KB (added by , 13 years ago) |
---|
-
_source/plugins/domiterator/plugin.js
31 31 32 32 var beginWhitespaceRegex = /^[\r\n\t ]+$/, 33 33 // Ignore bookmark nodes.(#3783) 34 bookmarkGuard = CKEDITOR.dom.walker.bookmark( false, true ); 34 bookmarkGuard = CKEDITOR.dom.walker.bookmark( false, true ), 35 whitespacesGuard = CKEDITOR.dom.walker.whitespaces( true ), 36 skipGuard = function( node ) { return bookmarkGuard( node ) && whitespacesGuard( node ); }; 35 37 36 38 // Get a reference for the next element, bookmark nodes are skipped. 37 39 function getNextSourceNode( node, startFromSibling, lastNode ) … … 207 209 // to close the range, otherwise we include the parent within it. 208 210 if ( range && !closeRange ) 209 211 { 210 while ( !currentNode.getNext( bookmarkGuard ) && !isLast )212 while ( !currentNode.getNext( skipGuard ) && !isLast ) 211 213 { 212 214 var parentNode = currentNode.getParent(); 213 215 … … 215 217 && !parentPre && { br : 1 } ) ) 216 218 { 217 219 closeRange = 1; 220 includeNode = 0; 218 221 isLast = isLast || ( parentNode.equals( lastNode) ); 222 // Make sure range includes bookmarks at the end of the block. (#7359) 223 range.setEndAt( parentNode, CKEDITOR.POSITION_BEFORE_END ); 219 224 break; 220 225 } 221 226