Roo/bootstrap/ComboBox.js
[roojs1] / Roo / bootstrap / ComboBox.js
index 54d7b90..eacd571 100644 (file)
@@ -1451,6 +1451,7 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
         
         if(this.tickable){
             
+            Roo.log(e.getTarget().nodeName.toLowerCase());
             if(typeof(e) != 'undefined' && e.getTarget().nodeName.toLowerCase() != 'input'){
                 return;
             }
@@ -1513,6 +1514,7 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
     onEmptyResults : function(){
         
         if(this.tickable && this.editable){
+            this.hasFocus = false;
             this.restrictHeight();
             return;
         }
@@ -1647,16 +1649,13 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
         if(this.fireEvent('beforequery', qe)===false || qe.cancel){
             return false;
         }
-        
-        Roo.log(qe);
-        
         q = qe.query;
         
         forceAll = qe.forceAll;
         if(forceAll === true || (q.length >= this.minChars)){
             
             this.hasQuery = true;
-            Roo.log('in??');
+            
             if(this.lastQuery != q || this.alwaysQuery){
                 this.lastQuery = q;
                 if(this.mode == 'local'){
@@ -1678,7 +1677,6 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
                     
                     this.onLoad();
                     
-                    Roo.log('onload???');
                     
                 }else{
                     
@@ -1701,7 +1699,6 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
 //                    this.expand();
                 }
             }else{
-                Roo.log('in!!??');
                 this.selectedIndex = -1;
                 this.onLoad();   
             }
@@ -2134,6 +2131,10 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
     
     validate : function()
     {
+        if(this.getVisibilityEl().hasClass('hidden')){
+            return true;
+        }
+        
         var v = this.getRawValue();
         
         if(this.multiple){