Ticket #3104: 3104_3.patch

File 3104_3.patch, 5.0 KB (added by Martin Kou, 15 years ago)
  • _source/plugins/sourcearea/plugin.js

     
    3535                                                                outline : 'none',
    3636                                                                'text-align' : 'left' });
    3737
    38                                                         // Add the tab index for #3098.
    39                                                         var tabIndex = editor.element && editor.element.getAttribute( 'tabIndex' );
    40                                                         if ( tabIndex )
    41                                                                 textarea.setAttribute( 'tabIndex', tabIndex );
    42 
    4338                                                        // The textarea height/width='100%' doesn't
    4439                                                        // constraint to the 'td' in IE strick mode
    4540                                                        if ( CKEDITOR.env.ie )
     
    7469                                                        // Set the <textarea> value.
    7570                                                        this.loadData( data );
    7671
     72                                                        // Execute "tab" and "shiftTab" commands if the relevant keys are
     73                                                        // pressed. (#3104)
     74                                                        textarea.on( 'keydown', function( evt )
     75                                                                {
     76                                                                        var $evt = evt.data.$;
     77
     78                                                                        if ( $evt.keyCode != 9 || $evt.ctrlKey || $evt.metaKey || $evt.altKey )
     79                                                                                return;
     80
     81                                                                        if ( $evt.shiftKey )
     82                                                                                editor.execCommand( 'shiftTab' );
     83                                                                        else
     84                                                                                editor.execCommand( 'tab' );
     85
     86                                                                        evt.data.preventDefault();
     87                                                                } );
     88
    7789                                                        editor.mode = 'source';
    7890                                                        editor.fire( 'mode' );
    7991                                                },
  • _source/plugins/editingblock/plugin.js

     
    9898                                        // Do that once only.
    9999                                        event.removeListener();
    100100
     101                                        // Grab editor focus if the editor container is focused. (#3104)
     102                                        editor.container.on( 'focus', function()
     103                                                {
     104                                                        editor.focus();
     105                                                } );
     106
    101107                                        // Fire instanceReady for both the editor and CKEDITOR.
    102108                                        editor.fireOnce( 'instanceReady' );
    103109                                        CKEDITOR.fire( 'instanceReady', null, editor );
    104110                                });
     111
    105112                }
    106113        });
    107114
  • _source/plugins/tab/plugin.js

     
    1313                {
    1414                        // We need an empty element after the container, so the focus don't go to a container child.
    1515                        var tempSpan = new CKEDITOR.dom.element( 'span' );
    16                         tempSpan.setAttribute( 'tabindex', editor.container.getTabIndex() );
     16                        tempSpan.setAttribute( 'tabIndex', editor.container.getTabIndex() );
    1717                        tempSpan.hide();
    1818
    1919                        // Insert the temp element and set the focus.
     
    253253
    254254                        element = new CKEDITOR.dom.element( element );
    255255
     256                        if ( element.getComputedStyle( 'display' ) == 'none' || element.getComputedStyle( 'visibility' ) == 'hidden' )
     257                                continue;
     258
    256259                        elementTabIndex = element.getTabIndex();
    257260
    258261                        if ( elementTabIndex > 0 )
  • _source/plugins/wysiwygarea/plugin.js

     
    106106
    107107                                        // The following information is needed for IE only.
    108108                                        var isCustomDomain = CKEDITOR.env.ie && document.domain != window.location.hostname;
    109 
     109                                               
    110110                                        // Creates the iframe that holds the editable document.
    111111                                        var createIFrame = function()
    112112                                        {
     
    121121                                                                width : '100%',
    122122                                                                height : '100%' });
    123123
    124                                                 var tabIndex = editor.element && editor.element.getAttribute( 'tabIndex' );
    125                                                 if ( tabIndex )
    126                                                         iframe.setAttribute( 'tabIndex', tabIndex );
    127 
    128124                                                if ( CKEDITOR.env.ie )
    129125                                                {
    130126                                                        if ( isCustomDomain )
  • _source/themes/default/theme.js

     
    4545
    4646                        var height      = contentsHtml && editor.config.height;
    4747                        var width       = editor.config.width;
     48                        var tabIndex = editor.element.getAttribute( 'tabIndex' );
    4849
    4950                        // The editor height is considered only if the contents space got filled.
    5051                        if ( !contentsHtml )
     
    6667                        // differently by the browsers ("semi-inline").
    6768                        var container = CKEDITOR.dom.element.createFromHtml( [
    6869                                '<span id="cke_', name, '" onmousedown="return false;" class="', editor.skinClass,
    69                                         '" dir="', editor.lang.dir, '" title="', ( CKEDITOR.env.gecko ? ' ' : '' ), '">' +
     70                                        '" dir="', editor.lang.dir, '" title="', ( CKEDITOR.env.gecko ? ' ' : '' ), '"' +
     71                                        ( tabIndex ? ' tabindex="' + tabIndex + '">' : '>' ) +
    7072                                '<span class="' , browserCssClass, ' cke_', editor.lang.dir, '">' +
    7173                                        '<table class="cke_editor" border="0" cellspacing="0" cellpadding="0" style="width:', width, ';height:', height, '"><tbody>' +
    7274                                                '<tr', topHtml          ? '' : ' style="display:none"', '><td id="cke_top_'             , name, '" class="cke_top">'            , topHtml               , '</td></tr>' +
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy