X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Fdialogui%2Fplugin.js;h=fc3a7f467740cec2f924d147bdc4e9308afa5946;hp=1567c945bae7f5ebde5da2220b047d555054d610;hb=8665a7c6c60586526e32e8941fe2896739b6ebfb;hpb=e7789c1ad838194d45eeee6ac2eb6e55f5cf35a1 diff --git a/_source/plugins/dialogui/plugin.js b/_source/plugins/dialogui/plugin.js index 1567c94..fc3a7f4 100644 --- a/_source/plugins/dialogui/plugin.js +++ b/_source/plugins/dialogui/plugin.js @@ -87,7 +87,14 @@ CKEDITOR.plugins.add( 'dialogui' ); { dialog.on( 'load', function() { - this.getInputElement().on( 'change', function(){ this.fire( 'change', { value : this.getValue() } ); }, this ); + this.getInputElement().on( 'change', function() + { + // Make sure 'onchange' doesn't get fired after dialog closed. (#5719) + if ( !dialog.parts.dialog.isVisible() ) + return; + + this.fire( 'change', { value : this.getValue() } ); + }, this ); }, this ); this._.domOnChangeRegistered = true; } @@ -507,7 +514,7 @@ CKEDITOR.plugins.add( 'dialogui' ); element.on( 'keydown', function( evt ) { - if ( evt.data.getKeystroke() in { 32:1, 13:1 } ) + if ( evt.data.getKeystroke() in { 32:1 } ) { me.click(); evt.data.preventDefault();