Roo/bootstrap/ComboBox.js
[roojs1] / Roo / bootstrap / ComboBox.js
index d6eff91..5f5015c 100644 (file)
@@ -1513,6 +1513,7 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
     onEmptyResults : function(){
         
         if(this.tickable && this.editable){
+            this.hasFocus = false;
             this.restrictHeight();
             return;
         }
@@ -1730,7 +1731,6 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
         this.hasFocus = false;
         
         if(this.tickable){
-            
             this.okBtn.hide();
             this.cancelBtn.hide();
             this.trigger.show();
@@ -2130,6 +2130,10 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
     
     validate : function()
     {
+        if(this.getEl().hasClass('hidden')){
+            return true;
+        }
+        
         var v = this.getRawValue();
         
         if(this.multiple){