Ticket #5622: 5622_2.patch

File 5622_2.patch, 2.2 KB (added by Garry Yao, 14 years ago)
  • _source/plugins/wysiwygarea/plugin.js

     
    373373                                                        setTimeout( function()
    374374                                                        {
    375375                                                                // Prefer 'contentEditable' instead of 'designMode'. (#3593)
    376                                                                 if ( CKEDITOR.env.gecko && CKEDITOR.env.version >= 10900 )
     376                                                                if ( CKEDITOR.env.gecko && CKEDITOR.env.version >= 10900
     377                                                                                || CKEDITOR.env.opera )
    377378                                                                        domDocument.$.body.contentEditable = true;
    378                                                                 else if ( CKEDITOR.env.webkit || CKEDITOR.env.opera )
     379                                                                else if ( CKEDITOR.env.webkit )
    379380                                                                        domDocument.$.body.parentNode.contentEditable = true;
    380381                                                                else
    381382                                                                        domDocument.$.designMode = 'on';
     
    454455                                                // clicking outside actual content, manually apply the focus. (#1659)
    455456                                                if ( CKEDITOR.env.ie
    456457                                                        && domDocument.$.compatMode == 'CSS1Compat'
    457                                                                 || CKEDITOR.env.gecko )
     458                                                                || CKEDITOR.env.gecko
     459                                                                || CKEDITOR.env.opera )
    458460                                                {
    459461                                                        var htmlElement = domDocument.getDocumentElement();
    460462                                                        htmlElement.on( 'mousedown', function( evt )
     
    480482
    481483                                                focusTarget.on( 'focus', function()
    482484                                                        {
     485                                                                // Force the cursor blinking. (#5622
     486                                                                CKEDITOR.env.gecko && blinkCursor();
    483487                                                                editor.focusManager.focus();
    484488                                                        });
    485489
     
    764768                                                                        isPendingFocus = true;
    765769                                                                else if ( editor.window )
    766770                                                                {
    767                                                                         editor.window.focus();
     771                                                                        // [Webkit] Force the cursor blinking
     772                                                                        // when setting focus manually. (#5622)
     773                                                                        CKEDITOR.env.webkit && blinkCursor();
     774
     775                                                                        if ( CKEDITOR.env.opera )
     776                                                                                editor.document.getBody().focus();
     777                                                                        else
     778                                                                                editor.window.focus();
     779
    768780                                                                        editor.selectionChange();
    769781                                                                }
    770782                                                        }
     
    797809                        }
    798810
    799811                        // Create an invisible element to grab focus.
    800                         if ( CKEDITOR.env.gecko || CKEDITOR.env.ie )
     812                        if ( CKEDITOR.env.gecko || CKEDITOR.env.ie || CKEDITOR.env.opera )
    801813                        {
    802814                                var focusGrabber;
    803815                                editor.on( 'uiReady', function()
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy