Ticket #5673: 5673.patch

File 5673.patch, 1.8 KB (added by Garry Yao, 14 years ago)
  • _source/plugins/tab/plugin.js

     
    5151                                        });
    5252                        }
    5353
    54                         if ( CKEDITOR.env.webkit )
     54                        if ( CKEDITOR.env.webkit || CKEDITOR.env.gecko )
    5555                        {
    5656                                editor.on( 'key', function( ev )
    5757                                        {
  • _source/plugins/wysiwygarea/plugin.js

     
    472472                                                        } );
    473473                                                }
    474474
    475                                                 var focusTarget = ( CKEDITOR.env.ie || CKEDITOR.env.webkit ) ?
    476                                                                 domWindow : domDocument;
    477 
    478                                                 focusTarget.on( 'blur', function()
     475                                                domWindow.on( 'blur', function()
    479476                                                        {
    480477                                                                editor.focusManager.blur();
    481478                                                        });
    482479
    483                                                 focusTarget.on( 'focus', function()
     480                                                domWindow.on( 'focus', function()
    484481                                                        {
    485                                                                 // Force the cursor blinking. (#5622
    486                                                                 CKEDITOR.env.gecko && blinkCursor();
     482                                                                var doc = editor.document;
     483                                                                if ( CKEDITOR.env.gecko || CKEDITOR.env.opera )
     484                                                                        doc.getBody().focus();
     485                                                                else if ( CKEDITOR.env.webkit )
     486                                                                        doc.getDocumentElement().focus();
     487
    487488                                                                editor.focusManager.focus();
    488489                                                        });
    489490
     
    769770                                                                        isPendingFocus = true;
    770771                                                                else if ( editor.window )
    771772                                                                {
    772                                                                         // [Webkit] Force the cursor blinking
    773                                                                         // when setting focus manually. (#5622)
    774                                                                         CKEDITOR.env.webkit && blinkCursor();
    775 
    776                                                                         if ( CKEDITOR.env.opera )
    777                                                                                 editor.document.getBody().focus();
    778                                                                         else
    779                                                                                 editor.window.focus();
     773                                                                        editor.window.focus();
    780774
    781775                                                                        editor.selectionChange();
    782776                                                                }
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy