Roo/bootstrap/ComboBox.js
[roojs1] / Roo / bootstrap / ComboBox.js
index 6f0e14b..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;
         }
@@ -1730,7 +1732,6 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
         this.hasFocus = false;
         
         if(this.tickable){
-            
             this.okBtn.hide();
             this.cancelBtn.hide();
             this.trigger.show();
@@ -1863,10 +1864,7 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
     
     onSearchFieldClick : function(e)
     {
-        Roo.log('in???');
-        
         if(this.hasFocus && !this.disabled && e.getTarget().nodeName.toLowerCase() != 'button'){
-            Roo.log('onSearchFieldClick');
             this.onTickableFooterButtonClick(e, false, false);
             return;
         }
@@ -2133,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){