- this.getInputElement().on( 'change', function(){ this.fire( 'change', { value : this.getValue() } ); }, this );\r
+ this.getInputElement().on( 'change', function()\r
+ {\r
+ // Make sure 'onchange' doesn't get fired after dialog closed. (#5719)\r
+ if ( !dialog.parts.dialog.isVisible() )\r
+ return;\r
+\r
+ this.fire( 'change', { value : this.getValue() } );\r
+ }, this );\r