Changed Roo/bootstrap/ComboBox.jsRoo/bootstrap/Menu.jsroojs-bootstrap-debug.jsroojs...
[roojs1] / roojs-bootstrap-debug.js
index e9febac..c769875 100644 (file)
@@ -3720,19 +3720,22 @@ Roo.extend(Roo.bootstrap.Menu, Roo.bootstrap.Component,  {
         
        // Roo.log("ADD event");
        // Roo.log(this.triggerEl.dom);
-        
-        this.triggerEl.on('click', this.onTriggerClick, this);
-        
-        this.triggerEl.on(Roo.isTouch ? 'touchstart' : 'mouseup', this.onTriggerPress, this);
-        
-       if (!this.hideTrigger) {
-           if (this.triggerEl.hasClass('nav-item') && this.triggerEl.select('.nav-link',true).length) {
-               // dropdown toggle on the 'a' in BS4?
-               this.triggerEl.select('.nav-link',true).first().addClass('dropdown-toggle');
-           } else {
-               this.triggerEl.addClass('dropdown-toggle');
+        if (this.triggerEl) {
+           
+           this.triggerEl.on('click', this.onTriggerClick, this);
+           
+           this.triggerEl.on(Roo.isTouch ? 'touchstart' : 'mouseup', this.onTriggerPress, this);
+           
+           if (!this.hideTrigger) {
+               if (this.triggerEl.hasClass('nav-item') && this.triggerEl.select('.nav-link',true).length) {
+                   // dropdown toggle on the 'a' in BS4?
+                   this.triggerEl.select('.nav-link',true).first().addClass('dropdown-toggle');
+               } else {
+                   this.triggerEl.addClass('dropdown-toggle');
+               }
            }
        }
+       
         if (Roo.isTouch) {
             this.el.on('touchstart'  , this.onTouch, this);
         }
@@ -3894,7 +3897,10 @@ Roo.extend(Roo.bootstrap.Menu, Roo.bootstrap.Component,  {
         //this.el.show();
         this.hideMenuItems();
         this.hidden = false;
-        this.triggerEl.addClass('open');
+       if (this.triggerEl) {
+           this.triggerEl.addClass('open');
+       }
+        
        this.el.addClass('show');
         
        
@@ -16374,7 +16380,7 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
             this.inputEl().on('mousedown', this.onTriggerClick,  this);
             this.inputEl().addClass('x-combo-noedit');
         }else{
-            this.inputEl().dom.setAttribute('readOnly', false);
+            this.inputEl().dom.removeAttribute('readOnly');
             this.inputEl().un('mousedown', this.onTriggerClick,  this);
             this.inputEl().removeClass('x-combo-noedit');
         }