Changeset 2107

Show
Ignore:
Timestamp:
2008-06-23 11:27:09 (7 months ago)
Author:
fredck
Message:

Fixed #2197 : The TAB key will now have the default browser behavior if TabSpaces=0. It will move the focus out of the editor (expect on Safari).

Location:
FCKeditor/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/_source/classes/fckenterkey.js

    r2096 r2107  
    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 ) 
    53         { 
    54                 this.TabText = '' ; 
    55                 while ( 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 ) 
     56        { 
     57                while ( tabSpaces-- ) 
    5658                        this.TabText += '\xa0' ; 
     59 
     60                oKeystrokeHandler.SetKeystrokes( [ 9, 'Tab' ] ); 
    5761        } 
    5862 
  • FCKeditor/trunk/_whatsnew.html

    r2106 r2107  
    7272                        cursor is at the start or the end of blocks. No extra paragraphs will be included 
    7373                        in this operation.</li> 
     74                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2149">#2197</a>] The TAB 
     75                        key will now have the default browser behavior if TabSpaces=0. It will move the 
     76                        focus out of the editor (expect on Safari).</li> 
    7477        </ul> 
    7578        <p>