Ticket #5719: 5719.patch

File 5719.patch, 820 bytes (added by Garry Yao, 14 years ago)
  • _source/plugins/dialogui/plugin.js

     
    8787                                {
    8888                                        dialog.on( 'load', function()
    8989                                                {
    90                                                         this.getInputElement().on( 'change', function(){ this.fire( 'change', { value : this.getValue() } ); }, this );
    91                                                 }, this );
     90                                                        this.getInputElement().on( 'change', function()
     91                                                        {
     92                                                                // Make sure 'onchange' doesn't get fired after dialog closed. (#5719)
     93                                                                if ( !dialog.parts.dialog.isVisible() )
     94                                                                        return;
     95                                                               
     96                                                                this.fire( 'change', { value : this.getValue() } );
     97                                                        }, this );
     98                                                }, this );
    9299                                        this._.domOnChangeRegistered = true;
    93100                                }
    94101
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy