Ticket #1664: 1664.patch

File 1664.patch, 2.1 KB (added by fredck, 13 months ago)
  • _whatsnew.html

     
    5757                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/339">#339</a>] [<a 
    5858                        target="_blank" href="http://dev.fckeditor.net/ticket/681">#681</a>] The SpellerPages 
    5959                        spell checker will now completely ignore the presence of HTML tags in the text.</li> 
     60                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1664">#1664</a>] The ENTER 
     61                        key will not anymore swap the order of the tags when hit at the end of paragraphs.</li> 
    6062        </ul> 
    6163        <p> 
    6264                <a href="_whatsnew_history.html">See previous versions history</a> 
  • editor/_source/classes/fckenterkey.js

     
    461461                        var elementPath = oSplitInfo.ElementPath ; 
    462462                        if ( elementPath ) 
    463463                        { 
    464                                 var eFocusElement = eNewBlock ; 
    465464                                for ( var i = 0, len = elementPath.Elements.length ; i < len ; i++ ) 
    466465                                { 
    467466                                        var element = elementPath.Elements[i] ; 
    468467 
    469468                                        if ( element == elementPath.Block || element == elementPath.BlockLimit ) 
    470469                                                break ; 
    471  
     470                                         
    472471                                        if ( FCKListsLib.InlineChildReqElements[ element.nodeName.toLowerCase() ] ) 
    473                                                 eFocusElement = eFocusElement.appendChild( FCKDomTools.CloneElement( element ) ) ; 
     472                                        { 
     473                                                element = FCKDomTools.CloneElement( element ) ; 
     474                                                FCKDomTools.MoveChildren( eNewBlock, element ) ; 
     475                                                eNewBlock.appendChild( element ) ; 
     476                                        } 
    474477                                } 
    475478                        } 
    476479 
  • editor/_source/internals/fckdomtools.js

     
    2323 
    2424var FCKDomTools = 
    2525{ 
     26        /** 
     27         * Move all child nodes from one node to another. 
     28         */ 
    2629        MoveChildren : function( source, target, toTargetStart ) 
    2730        { 
    2831                if ( source == target )