Changeset 3898


Ignore:
Timestamp:
07/15/2009 01:22:09 PM (6 years ago)
Author:
garry.yao
Message:

Fixing #3949: Linkbreak inside <pre> is not at the correct position.

Location:
CKEditor/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CKEditor/trunk/CHANGES.html

    r3894 r3898  
    131131                <li><a href="http://dev.fckeditor.net/ticket/3671">#3671</a> : Fixed body fixing should be applied to the real type under fake elements.</li>
    132132                <li><a href="http://dev.fckeditor.net/ticket/3836">#3836</a> : Fixed remove list in enterMode=BR will merge sibling text to one line.</li>
     133                <li><a href="http://dev.fckeditor.net/ticket/3949">#3949</a> : Fixed enterKey within pre-formatted text introduce wrong line-break.</li>
    133134        </ul>
    134135        <h3>
  • CKEditor/trunk/_source/plugins/selection/plugin.js

    r3848 r3898  
    492492
    493493                                                testRange.setEndPoint( 'StartToStart', range );
    494                                                 var distance = testRange.text.length;
     494                                                // IE report line break as CRLF with range.text but
     495                                                // only LF with textnode.nodeValue, normalize them to avoid
     496                                                // breaking character counting logic below. (#3949)
     497                                                var distance = testRange.text.replace( /(\r\n|\r)/g, '\n' ).length;
    495498
    496499                                                while ( distance > 0 )
     
    944947        CKEDITOR.env.ie ?
    945948                // V2
    946                 function()
     949                function( forceExpand )
    947950                {
    948951                        var collapsed = this.collapsed;
     
    984987                                // Actually, we are using this flag just to avoid using this hack in all
    985988                                // situations, but just on those needed.
    986                                 isStartMarkerAlone = !startNode.hasPrevious() || ( startNode.getPrevious().is && startNode.getPrevious().is( 'br' ) );
     989                                isStartMarkerAlone = forceExpand || !startNode.hasPrevious() || ( startNode.getPrevious().is && startNode.getPrevious().is( 'br' ) );
    987990
    988991                                // Append a temporary <span>&#65279;</span> before the selection.
Note: See TracChangeset for help on using the changeset viewer.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy