Ticket #5936: 5936.patch
File 5936.patch, 1020 bytes (added by , 14 years ago) |
---|
-
_source/plugins/menubutton/plugin.js
29 29 if ( _.state === CKEDITOR.TRISTATE_DISABLED ) 30 30 return; 31 31 32 _.previousState = _.state; 32 if ( !_.on ) 33 { 34 _.previousState = _.state; 35 } 33 36 34 37 // Check if we already have a menu for it, otherwise just create it. 35 38 var menu = _.menu; … … 41 44 menu.onHide = CKEDITOR.tools.bind( function() 42 45 { 43 46 this.setState( _.previousState ); 47 _.on = false; 44 48 }, 45 49 this ); 46 50 … … 53 57 54 58 if ( _.on ) 55 59 { 56 menu.hide(); 60 menu._.menu.hide(); 61 menu.editor.focus(); 57 62 return; 58 63 } 59 64 65 menu.show( CKEDITOR.document.getById( this._.id ), 4 ); 66 67 /** 68 * menu.show() hides the menu before show it 69 * so let set state to ON after menu.show 70 * to prevent enabled button after second click 71 */ 60 72 this.setState( CKEDITOR.TRISTATE_ON ); 61 73 62 menu.show( CKEDITOR.document.getById( this._.id ), 4 );74 _.on = true; 63 75 }; 64 76 65 77