Roo/bootstrap/ComboBox.js
[roojs1] / Roo / bootstrap / ComboBox.js
index 03ec8a7..deb94cb 100644 (file)
@@ -1513,10 +1513,11 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
     onEmptyResults : function(){
         
         if(this.tickable && this.editable){
+            this.hasFocus = false;
             this.restrictHeight();
-            // return;
+            return;
         }
-        Roo.log(this.isExpanded());
+        
         this.collapse();
     },
 
@@ -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.getVisibilityEl().hasClass('hidden') || !this.getVisibilityEl().isVisible(true)){
+            return true;
+        }
+        
         var v = this.getRawValue();
         
         if(this.multiple){