Index: _source/plugins/adobeair/plugin.js
===================================================================
--- _source/plugins/adobeair/plugin.js	(revision 6178)
+++ _source/plugins/adobeair/plugin.js	(revision )
@@ -27,12 +27,13 @@
 				{
 					(function( eventName )
 					{
+						var inlineEventHandler = node.getAttribute( 'on' + eventName );
 						if ( node.hasAttribute( 'on' + eventName ) )
 						{
+							node.removeAttribute( 'on' + eventName );
 							node.on( eventName, function( evt )
 							{
-								var inlineEventHandler = node.getAttribute( 'on' + eventName ),
-									callFunc = /(return\s*)?CKEDITOR\.tools\.callFunction\(([^)]+)\)/.exec( inlineEventHandler ),
+								var callFunc = /(return\s*)?CKEDITOR\.tools\.callFunction\(([^)]+)\)/.exec( inlineEventHandler ),
 									hasReturn = callFunc && callFunc[ 1 ],
 									callFuncArgs = callFunc &&  callFunc[ 2 ].split( ',' ),
 									preventDefault = /return false;/.test( inlineEventHandler );
Index: _source/plugins/dialog/plugin.js
===================================================================
--- _source/plugins/dialog/plugin.js	(revision 6188)
+++ _source/plugins/dialog/plugin.js	(revision )
@@ -725,7 +725,6 @@
 			else
 				element.setStyle( 'display', 'block' );
 
-			CKEDITOR.ui.fire( 'ready', this );
 			// FIREFOX BUG: Fix vanishing caret for Firefox 2 or Gecko 1.8.
 			if ( CKEDITOR.env.gecko && CKEDITOR.env.version < 10900 )
 			{
@@ -792,6 +791,8 @@
 
 					// Execute onLoad for the first show.
 					this.fireOnce( 'load', {} );
+					CKEDITOR.ui.fire( 'ready', this );
+
 					this.fire( 'show', {} );
 					this._.editor.fire( 'dialogShow', this );
 
