Ticket #7904: 7904.patch

File 7904.patch, 1.6 KB (added by Sa'ar Zac Elias, 12 years ago)
  • _source/plugins/floatpanel/plugin.js

     
    9898                        showBlock : function( name, offsetParent, corner, offsetX, offsetY )
    9999                        {
    100100                                var panel = this._.panel,
    101                                         block = panel.showBlock( name );
     101                                        block = panel.showBlock( name ),
     102                                        editor = this._.editor;
    102103
    103104                                this.allowBlur( false );
    104105                                isShowing = 1;
    105106
    106                                 // Record from where the focus is when open panel.
    107                                 this._.returnFocus = this._.editor.focusManager.hasFocus ? this._.editor : new CKEDITOR.dom.element( CKEDITOR.document.$.activeElement );
     107                                // Record from where the focus is when open panel (#6247). If it is outside editor chrome, default back to editor (#7904).
     108                                var returnFocus = editor.focusManager.hasFocus ? editor : new CKEDITOR.dom.element( CKEDITOR.document.$.activeElement );
     109                                if ( returnFocus.type && !editor.container.equals( returnFocus ) && !editor.container.contains( returnFocus ) )
     110                                        returnFocus = editor;
     111                                this._.returnFocus = returnFocus;
    108112
    109113
    110114                                var element = this.element,
  • _source/plugins/format/plugin.js

     
    6363                                        setTimeout( function()
    6464                                        {
    6565                                                editor.fire( 'saveSnapshot' );
    66                                                 // At this point, focus might be lost (#7192).
    67                                                 CKEDITOR.env.ie && editor.focus();
    6866                                        }, 0 );
    6967                                },
    7068
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy