JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.4.3
[ckeditor.git] / _source / plugins / menubutton / plugin.js
index 4797a4e..ae80bbb 100644 (file)
@@ -36,18 +36,17 @@ CKEDITOR.UI_MENUBUTTON = 5;
                if ( !menu )\r
                {\r
                        menu = _.menu = new CKEDITOR.plugins.contextMenu( editor );\r
+                       menu.definition.panel.attributes[ 'aria-label' ] = editor.lang.common.options;\r
 \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