Ticket #7882: 7882_2.patch

File 7882_2.patch, 2.3 KB (added by Garry Yao, 13 years ago)
  • _source/plugins/menu/plugin.js

     
    188188                        {
    189189                                var menu = this._.subMenu,
    190190                                        item = this.items[ index ],
     191                                        // Get the element representing the current item.
     192                                        element = this._.panel.getBlock( this.id ).element.getDocument().getById( this.id + String( index ) ),
    191193                                        subItemDefs = item.getItems && item.getItems();
    192194
    193                                 // If this item has no subitems, we just hide the submenu, if
    194                                 // available, and return back.
     195                                // If this item has no subitems, we just grab the focus, which will hide the submenu.
    195196                                if ( !subItemDefs )
    196197                                {
    197                                         this._.panel.hideChild();
     198                                        element.focus();
    198199                                        return;
    199200                                }
    200201
     
    225226                                        }
    226227                                }
    227228
    228                                 // Get the element representing the current item.
    229                                 var element = this._.panel.getBlock( this.id ).element.getDocument().getById( this.id + String( index ) );
    230 
    231229                                // Show the submenu.
    232230                                menu.show( element, 2 );
    233231                        }
  • _source/plugins/floatpanel/plugin.js

     
    166166                                                        if ( target.getName && target.getName() != 'iframe' )
    167167                                                                return;
    168168
    169                                                         if ( this.visible && !this._.activeChild && !isShowing )
     169                                                        if ( this.visible && !this._.activeChild )
    170170                                                        {
    171171                                                                // Panel close is caused by user's navigating away the focus, e.g. click outside the panel.
    172172                                                                // DO NOT restore focus in this case.
     
    180180                                                {
    181181                                                        this._.focused = true;
    182182                                                        this.hideChild();
    183                                                         this.allowBlur( true );
    184183                                                },
    185184                                                this );
    186185
     
    310309                                                CKEDITOR.tools.setTimeout( function()
    311310                                                {
    312311                                                        iframe.$.contentWindow.focus();
    313                                                         // We need this get fired manually because of unfired focus() function.
    314312                                                        this.allowBlur( true );
    315313                                                }, 0, this);
    316314                                        },  CKEDITOR.env.air ? 200 : 0, this);
     
    319317                                if ( this.onShow )
    320318                                        this.onShow.call( this );
    321319
    322                                 isShowing = 0;
    323320                        },
    324321
    325322                        hide : function( returnFocus )
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy