Ticket #1853: 1853.patch

File 1853.patch, 1.5 KB (added by Martin Kou, 11 years ago)
  • _whatsnew.html

     
    6565                        [<a target="_blank" href="http://dev.fckeditor.net/ticket/1985">#1985</a>]
    6666                        [<a target="_blank" href="http://dev.fckeditor.net/ticket/1989">#1989</a>]
    6767                        Fixed XHTML source formatting errors in non-IE browsers.</li>
     68                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1853">#1853</a>] Setting
     69                        ShiftEnterMode to p or div now works correctly when EnterMode is br.</li>
    6870        </ul>
    6971        <h3>
    7072                Version 2.6 Beta 1</h3>
  • editor/_source/classes/fckenterkey.js

     
    404404
    405405        if ( oSplitInfo )
    406406        {
     407                // If both PreviousBlock and NextBlock are null, it means SplitBlock() was unable to split.
     408                // Why does that happen? Easy, because there's no block. (See #1853)
     409                // So let's format the stuff around the selection first and split again.
     410                if ( !oSplitInfo.PreviousBlock && !oSplitInfo.NextBlock )
     411                {
     412                        FCK.Styles.GetStyle( '_FCK_' + blockTag.toLowerCase() ).ApplyToRange( oRange, true ) ;
     413                        oRange.Release( true ) ;
     414                        oSplitInfo = oRange.SplitBlock() ;
     415                }
     416
    407417                // Get the current blocks.
    408418                var ePreviousBlock      = oSplitInfo.PreviousBlock ;
    409419                var eNextBlock          = oSplitInfo.NextBlock ;
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy