Ticket #8333: 8333.patch

File 8333.patch, 789 bytes (added by Alfonso Martínez de Lizarrondo, 13 years ago)

Proposed patch

  • _source/plugins/dialog/plugin.js

     
    819819                        // Register the Esc hotkeys.
    820820                        registerAccessKey( this, this, '\x1b', null, function()
    821821                                        {
    822                                                 this.getButton( 'cancel' ) && this.getButton( 'cancel' ).click();
     822                                                var button = this.getButton( 'cancel' );
     823                                                // If there's a Cancel button, click it, else just fire the cancel event and hide the dialog
     824                                                if ( button )
     825                                                        button.click();
     826                                                else
     827                                                {
     828                                                        if ( this.fire( 'cancel', { hide : true } ).hide !== false )
     829                                                                this.hide();
     830                                                }
    823831                                        } );
    824832
    825833                        // Reset the hasFocus state.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy