Ticket #2297: 2297.patch

File 2297.patch, 1.6 KB (added by Frederico Caldeira Knabben, 16 years ago)
  • _whatsnew.html

     
    6464                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2149">#2149</a>] CSS urls
    6565                        with querystring parameters were not being accepted for CSS values in the configuration
    6666                        file (like EditorAreaCSS).</li>
     67                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2149">#2197</a>] The TAB
     68                        key will now have the default browser behavior if TabSpaces=0. It will move the
     69                        focus out of the editor (expect on Safari).</li>
    6770        </ul>
    6871        <p>
    6972        </p>
  • editor/_source/classes/fckenterkey.js

     
    4343        oKeystrokeHandler.SetKeystrokes( [
    4444                [ 13            , 'Enter' ],
    4545                [ SHIFT + 13, 'ShiftEnter' ],
    46                 [ 9             , 'Tab' ],
    4746                [ 8                     , 'Backspace' ],
    48                 [ CTRL + 8              , 'CtrlBackspace' ],
     47                [ CTRL + 8      , 'CtrlBackspace' ],
    4948                [ 46            , 'Delete' ]
    5049        ] ) ;
    5150
    52         if ( tabSpaces > 0 )
     51        this.TabText = '' ;
     52
     53        // Safari by default inserts 4 spaces on TAB, while others make the editor
     54        // loose focus. So, we need to handle it here to not include those spaces.
     55        if ( tabSpaces > 0 || FCKBrowserInfo.IsSafari )
    5356        {
    54                 this.TabText = '' ;
    55                 while ( tabSpaces-- > 0 )
     57                while ( tabSpaces-- )
    5658                        this.TabText += '\xa0' ;
     59
     60                oKeystrokeHandler.SetKeystrokes( [ 9, 'Tab' ] );
    5761        }
    5862
    5963        oKeystrokeHandler.AttachToElement( targetWindow.document ) ;
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy