X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fmenubutton%2Fplugin.js;h=ae80bbba33fedc2cee6ecef83af4b47cda2302ef;hb=614511639979907ceb0da3614122a4d8eb963ad4;hp=4797a4eb63b9094f0e6468a98985127385012468;hpb=941b0a9ba4e673e292510d80a5a86806994b8ea6;p=ckeditor.git diff --git a/_source/plugins/menubutton/plugin.js b/_source/plugins/menubutton/plugin.js index 4797a4e..ae80bbb 100644 --- a/_source/plugins/menubutton/plugin.js +++ b/_source/plugins/menubutton/plugin.js @@ -36,18 +36,17 @@ CKEDITOR.UI_MENUBUTTON = 5; if ( !menu ) { menu = _.menu = new CKEDITOR.plugins.contextMenu( editor ); + menu.definition.panel.attributes[ 'aria-label' ] = editor.lang.common.options; menu.onHide = CKEDITOR.tools.bind( function() { - this.setState( _.previousState ); + this.setState( this.modes && this.modes[ editor.mode ] ? _.previousState : CKEDITOR.TRISTATE_DISABLED ); }, this ); // Initialize the menu items at this point. if ( this.onMenu ) - { menu.addListener( this.onMenu ); - } } if ( _.on )