Index: _source/plugins/selection/plugin.js =================================================================== --- _source/plugins/selection/plugin.js (revision 3848) +++ _source/plugins/selection/plugin.js Wed Jul 15 17:38:06 CST 2009 @@ -491,7 +491,10 @@ } testRange.setEndPoint( 'StartToStart', range ); - var distance = testRange.text.length; + // IE report line break as CRLF with range.text but + // only LF with textnode.nodeValue, normalize them to avoid + // breaking character counting logic below. (#3949) + var distance = testRange.text.replace( /(\r\n|\r)/g, '\n' ).length; while ( distance > 0 ) distance -= siblings[ --i ].nodeValue.length; @@ -943,7 +943,7 @@ CKEDITOR.dom.range.prototype.select = CKEDITOR.env.ie ? // V2 - function() + function( forceExpand ) { var collapsed = this.collapsed; var isStartMarkerAlone; @@ -983,7 +983,7 @@ // will expand and that the cursor will be blinking on the right place. // Actually, we are using this flag just to avoid using this hack in all // situations, but just on those needed. - isStartMarkerAlone = !startNode.hasPrevious() || ( startNode.getPrevious().is && startNode.getPrevious().is( 'br' ) ); + isStartMarkerAlone = forceExpand || !startNode.hasPrevious() || ( startNode.getPrevious().is && startNode.getPrevious().is( 'br' ) ); // Append a temporary before the selection. // This is needed to avoid IE destroying selections inside emptyIndex: CHANGES.html =================================================================== --- CHANGES.html (revision 3894) +++ CHANGES.html Wed Jul 15 17:38:06 CST 2009 @@ -130,6 +130,7 @@