Ticket #5713: 5713.patch

File 5713.patch, 2.9 KB (added by Garry Yao, 14 years ago)
  • _source/themes/default/theme.js

     
    118118                                        ' dir="', editor.lang.dir, '"' +
    119119                                        ' title="', ( CKEDITOR.env.gecko ? ' ' : '' ), '"' +
    120120                                        ' lang="', editor.langCode, '"' +
     121                                        ( CKEDITOR.env.webkit? ' tabindex="' + tabIndex + '"' : '' ) +
    121122                                        ' role="application"' +
    122123                                        ' aria-labelledby="cke_', name, '_arialbl"' +
    123124                                        ( style ? ' style="' + style + '"' : '' ) +
  • _source/plugins/wysiwygarea/plugin.js

     
    319319                                                        // for other browers, the 'src' attribute should be left empty to
    320320                                                        // trigger iframe's 'load' event.
    321321                                                        ' src="' + ( CKEDITOR.env.ie ? 'javascript:void(function(){' + encodeURIComponent( srcScript ) + '}())' : '' ) + '"' +
    322                                                         ' tabIndex="' + editor.tabIndex + '"' +
     322                                                        ' tabIndex="' + ( CKEDITOR.env.webkit? -1 : editor.tabIndex ) + '"' +
    323323                                                        ' allowTransparency="true"' +
    324324                                                        '></iframe>' );
    325325
     
    495495                                                                if ( CKEDITOR.env.gecko || CKEDITOR.env.opera )
    496496                                                                        doc.getBody().focus();
    497497                                                                else if ( CKEDITOR.env.webkit )
     498                                                                {
     499                                                                        // Selection will get lost after move focus
     500                                                                        // to document element, save it first.
     501                                                                        var sel = editor.getSelection(),
     502                                                                                        type = sel.getType(),
     503                                                                                        range = ( type != CKEDITOR.SELECTION_NONE ) && sel.getRanges()[ 0 ];
     504
    498505                                                                        doc.getDocumentElement().focus();
     506                                                                        range && range.select();
     507                                                                }
    499508
    500509                                                                editor.focusManager.focus();
    501510                                                        });
  • _source/plugins/editingblock/plugin.js

     
    9595                                        // Do that once only.
    9696                                        event.removeListener();
    9797
     98                                        // Redirect the focus into editor for webkit. (#5713)
     99                                        CKEDITOR.env.webkit && editor.container.on( 'focus', function()
     100                                                {
     101                                                        editor.focus();
     102                                                });
     103
    98104                                        if ( editor.config.startupFocus )
    99105                                                editor.focus();
    100106
  • _source/plugins/sourcearea/plugin.js

     
    3434                                                        textarea.setAttributes(
    3535                                                                {
    3636                                                                        dir : 'ltr',
    37                                                                         tabIndex : editor.tabIndex,
     37                                                                        tabIndex : CKEDITOR.env.webkit ? -1 : editor.tabIndex,
    3838                                                                        'role' : 'textbox',
    3939                                                                        'aria-label' : editor.lang.editorTitle.replace( '%1', editor.name )
    4040                                                                });
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy