Index: /CKEditor/branches/prototype/_source/plugins/dialogui/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/dialogui/plugin.js	(revision 2488)
+++ /CKEditor/branches/prototype/_source/plugins/dialogui/plugin.js	(revision 2489)
@@ -203,15 +203,28 @@
 
 			// Register an event handler for processing button clicks.
-			var classRegex = /cke_dialog_ui_button\w*/, me = this;
+			var me = this;
 			dialog.on( 'load', function( eventInfo )
 					{
 						if ( !eventInfo.data.buttonHandlerRegistered )
 						{
-							var mouseUpHandler = function( evt )
-							{
-								this.removeClass( 'cke_dialog_ui_button_active' );
-								this.removeListener( 'mouseup', mouseUpHandler );
-								me.fire( 'click' );
-							}
+							dialog.getElement().on( 'mouseup', function( evt )
+								{
+									var target = evt.data.getTarget();
+
+									// If there's no active button, bail out.
+									if ( !CKEDITOR.ui.dialog.button._.activeButton )
+										return;
+
+									// Change styles to remove active status.
+									CKEDITOR.ui.dialog.button._.activeButton.removeClass( 'cke_dialog_ui_button_active' );
+
+									// Fire the click event - but only if the
+									// active button is the same as target.
+									if ( CKEDITOR.ui.dialog.button._.activeButton.$ == target.$ )
+										me.fire( 'click' );
+
+									// Clear active button flag.
+									CKEDITOR.ui.dialog.button.activeButton = null;
+								});
 
 							dialog.getElement().on( 'mousedown', function( evt )
@@ -219,6 +232,6 @@
 									var target = evt.data.getTarget();
 
-									// If we aren't inside a button, bail out.
-									if ( target.getName() != 'td' || !classRegex.test( target.$.className ) )
+									// If we aren't inside an inactive button, bail out.
+									if ( target.getName() != 'td' || target.$.className.search( 'cke_dialog_ui_button_txt' ) == -1 )
 										return;
 
@@ -226,6 +239,6 @@
 									target.addClass( 'cke_dialog_ui_button_active' );
 
-									// Add mouseup handler.
-									target.on( 'mouseup', mouseUpHandler );
+									// Store the currently active button.
+									CKEDITOR.ui.dialog.button._.activeButton = target;
 								});
 							eventInfo.data.buttonHandlerRegistered = true;
@@ -299,4 +312,6 @@
 	= CKEDITOR.ui.dialog.html.prototype = new CKEDITOR.ui.dialog.uiElement;
 
+CKEDITOR.ui.dialog.button._ = { activeButton : null };
+
 (function()
 {
Index: /CKEditor/branches/prototype/_source/skins/default/mainui.css
===================================================================
--- /CKEditor/branches/prototype/_source/skins/default/mainui.css	(revision 2488)
+++ /CKEditor/branches/prototype/_source/skins/default/mainui.css	(revision 2489)
@@ -53,5 +53,5 @@
 }
 
-.cke_skin_default.cke_focus
+.cke_skin_default .cke_focus
 {
 	outline: auto 5px -webkit-focus-ring-color;
