X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fdialogui%2Fplugin.js;h=6d7aaa3e7c71896ff3fd6b569a1258b95d9a73c4;hb=055b6b0792ce7dc53d47af606b367c04b927c2ab;hp=1567c945bae7f5ebde5da2220b047d555054d610;hpb=059b4c2fef02528bf1af189f7996e80652faddfb;p=ckeditor.git diff --git a/_source/plugins/dialogui/plugin.js b/_source/plugins/dialogui/plugin.js index 1567c94..6d7aaa3 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; } @@ -145,9 +152,10 @@ CKEDITOR.plugins.add( 'dialogui' ); /** @ignore */ var innerHTML = function() { - var html = []; + var html = [], + requiredClass = elementDefinition.required ? ' cke_required' : '' ; if ( elementDefinition.labelLayout != 'horizontal' ) - html.push( '