Ticket #3807: 3807_2.patch

File 3807_2.patch, 1.8 KB (added by Garry Yao, 15 years ago)
  • _source/plugins/selection/plugin.js

     
    537537                                                        boundaryInfo = getBoundaryInformation( nativeRange );
    538538                                                        range.setEnd( new CKEDITOR.dom.node( boundaryInfo.container ), boundaryInfo.offset );
    539539
     540                                                        // Prevent caret anchor at the end edge of paragraph followed by a text node,
     541                                                        // because the cursor will be 'visually' at next line of text.(#3807)
     542                                                        var endBlock, nextTextNode;
     543                                                        if ( ( ( endBlock = range.endContainer ) && endBlock.is && endBlock.isBlockBoundary() )
     544                                                                 && range.endOffset == endBlock.getChildren().count()
     545                                                                 && ( ( nextTextNode = endBlock.getNext() ) && nextTextNode.type == CKEDITOR.NODE_TEXT ) )
     546                                                        {
     547                                                                // Cheat IE to have the cursor anchored inside next text node.
     548                                                                var dummy = range.document.createText( '\ufeff' );
     549                                                                dummy.insertBefore( nextTextNode );
     550                                                                setTimeout( function(){ dummy.remove(); }, 0 );
     551                                                        }
     552                                                       
    540553                                                        return ( cache.ranges = [ range ] );
    541554                                                }
    542555                                                else if ( type == CKEDITOR.SELECTION_ELEMENT )
  • CHANGES.html

     
    5555                <li><a href="http://dev.fckeditor.net/ticket/3820">#3820</a> : Fixed an issue in
    5656                        bullet list command in which a list created at the bottom of another gets merged to the top.
    5757                        </li>
     58                <li><a href="http://dev.fckeditor.net/ticket/3807">#3807</a> : Fixed block style is applied to
     59                        previous block when cursor anchored in front of text following a paragraph.
     60                        </li>
    5861        </ul>
    5962        <h3>
    6063                CKEditor 3.0 RC</h3>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy