Index: /FCKeditor/branches/developers/mjk/editor/_source/classes/fcktoolbarbuttonui.js
===================================================================
--- /FCKeditor/branches/developers/mjk/editor/_source/classes/fcktoolbarbuttonui.js	(revision 273)
+++ /FCKeditor/branches/developers/mjk/editor/_source/classes/fcktoolbarbuttonui.js	(revision 274)
@@ -200,5 +200,5 @@
 {
 	if ( this._FCKButton.OnClick )
-		this._FCKButton.OnClick( this._FCKButton ) ;
+		this._FCKButton.OnClick( this._FCKButton, e) ;
 }
 
Index: /FCKeditor/branches/developers/mjk/editor/_source/classes/fcktoolbarpanelbutton.js
===================================================================
--- /FCKeditor/branches/developers/mjk/editor/_source/classes/fcktoolbarpanelbutton.js	(revision 273)
+++ /FCKeditor/branches/developers/mjk/editor/_source/classes/fcktoolbarpanelbutton.js	(revision 274)
@@ -20,11 +20,14 @@
  *
  * FCKToolbarPanelButton Class: represents a special button in the toolbar
- * that shows a panel when pressed.
+ * that shows a panel when pressed. ToolbarPanelButtons can also have a secondary
+ * command that runs as a default action when the button is pressed.
  */
 
-var FCKToolbarPanelButton = function( commandName, label, tooltip, style, icon )
+
+var FCKToolbarPanelButton = function( commandName, label, tooltip, style, icon, buttonCommandName)
 {
 	this.CommandName = commandName ;
-
+	this.ButtonCommandName = buttonCommandName || commandName;
+	this.ContextSensitive = true ;
 	var oIcon ;
 
@@ -44,5 +47,4 @@
 FCKToolbarPanelButton.prototype.Create = function( parentElement )
 {
-	parentElement.className += 'Menu' ;
 
 	this._UIButton.Create( parentElement ) ;
@@ -67,14 +69,26 @@
 */
 
-function FCKToolbarPanelButton_OnButtonClick( toolbarButton )
+function FCKToolbarPanelButton_OnButtonClick( toolbarButton, ev )
 {
 	var oButton = this._FCKToolbarPanelButton ;
 	var e = oButton._UIButton.MainElement ;
 
-	oButton._UIButton.ChangeState( FCK_TRISTATE_ON ) ;
-
-	oButton.LineImg.style.width = ( e.offsetWidth - 2 ) + 'px' ;
-
-	FCK.ToolbarSet.CurrentInstance.Commands.GetCommand( oButton.CommandName ).Execute( 0, e.offsetHeight - 1, e ) ; // -1 to be over the border
+	var eSrc = (ev ? ev.originalTarget : window.event.srcElement);
+	if (eSrc && eSrc.src && eSrc.clientHeight > 6)		//see if we've landed on the icon
+	{
+		FCK.ToolbarSet.CurrentInstance.Commands.GetCommand( oButton.ButtonCommandName ).Execute( 0, e.offsetHeight - 1, e, false ) ;
+	}
+	else	//we're on the arrow, so drop down
+	{
+		oButton.LineImg.style.width = ( e.offsetWidth - 2 ) + 'px' ;
+		if (oButton._UIButton.MainElement.parentElement)
+		{
+			oButton._UIButton.MainElement.oldClassName =
+				oButton._UIButton.MainElement.parentElement.className;
+			oButton._UIButton.MainElement.parentElement.className += "Menu";
+		}
+		oButton._UIButton.ChangeState( FCK_TRISTATE_ON ) ;
+		FCK.ToolbarSet.CurrentInstance.Commands.GetCommand( oButton.CommandName ).Execute( 0, e.offsetHeight - 1, e, true ) ; // -1 to be over the border
+	}
 }
 
@@ -82,5 +96,11 @@
 {
 	var oMenuButton = this._FCKToolbarPanelButton ;
+	if (oMenuButton._UIButton.MainElement.parentElement)
+	{	
+		oMenuButton._UIButton.MainElement.parentElement.className =
+			oMenuButton._UIButton.MainElement.oldClassName;
+	}
 	oMenuButton._UIButton.ChangeState( FCK_TRISTATE_OFF ) ;
+	FCKToolbarPanelButton.prototype.RefreshState;
 }
 
