JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.4.3
[ckeditor.git] / _source / plugins / menubutton / plugin.js
index bd98f79..ae80bbb 100644 (file)
@@ -40,15 +40,13 @@ CKEDITOR.UI_MENUBUTTON = 5;
 \r
                        menu.onHide = CKEDITOR.tools.bind( function()\r
                                {\r
-                                       this.setState( _.previousState );\r
+                                       this.setState( this.modes && this.modes[ editor.mode ] ? _.previousState : CKEDITOR.TRISTATE_DISABLED );\r
                                },\r
                                this );\r
 \r
                        // Initialize the menu items at this point.\r
                        if ( this.onMenu )\r
-                       {\r
                                menu.addListener( this.onMenu );\r
-                       }\r
                }\r
 \r
                if ( _.on )\r