Index: /CKEditor/trunk/_source/plugins/dialog/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/dialog/plugin.js	(revision 4991)
+++ /CKEditor/trunk/_source/plugins/dialog/plugin.js	(revision 4992)
@@ -93,12 +93,4 @@
 		definition = new definitionObject( this, definition );
 
-		// Fire the "dialogDefinition" event, making it possible to customize
-		// the dialog definition.
-		this.definition = definition = CKEDITOR.fire( 'dialogDefinition',
-			{
-				name : dialogName,
-				definition : definition
-			}
-			, editor ).definition;
 
 		var doc = CKEDITOR.document;
@@ -149,4 +141,12 @@
 		CKEDITOR.event.call( this );
 
+		// Fire the "dialogDefinition" event, making it possible to customize
+		// the dialog definition.
+		this.definition = definition = CKEDITOR.fire( 'dialogDefinition',
+			{
+				name : dialogName,
+				definition : definition
+			}
+			, editor ).definition;
 		// Initialize load, show, hide, ok and cancel events.
 		if ( definition.onLoad )
