X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Frichcombo%2Fplugin.js;h=76523bc1ca692037567fa06fd52535ff8d89f5b5;hb=refs%2Ftags%2Fv3.4.3;hp=710b946ebe99d92caf3a7fbd3a155fbbb6b7a014;hpb=e7789c1ad838194d45eeee6ac2eb6e55f5cf35a1;p=ckeditor.git diff --git a/_source/plugins/richcombo/plugin.js b/_source/plugins/richcombo/plugin.js index 710b946..76523bc 100644 --- a/_source/plugins/richcombo/plugin.js +++ b/_source/plugins/richcombo/plugin.js @@ -106,11 +106,7 @@ CKEDITOR.ui.richCombo = CKEDITOR.tools.createClass( return; } - if ( !_.committed ) - { - _.list.commit(); - _.committed = 1; - } + !_.committed && this.commit(); var value = this.getValue(); if ( value ) @@ -239,16 +235,16 @@ CKEDITOR.ui.richCombo = CKEDITOR.tools.createClass( me.onOpen(); }; - panel.onHide = function() + panel.onHide = function( preventOnClose ) { if ( me.className ) this.element.getFirst().removeClass( me.className + '_panel' ); - me.setState( CKEDITOR.TRISTATE_OFF ); + me.setState( me.modes && me.modes[ editor.mode ] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED ); me._.on = 0; - if ( me.onClose ) + if ( !preventOnClose && me.onClose ) me.onClose(); }; @@ -350,6 +346,7 @@ CKEDITOR.ui.richCombo = CKEDITOR.tools.createClass( commit : function() { this._.list.commit(); + this._.committed = 1; }, setState : function( state )