Roo/bootstrap/Menu.js
authoredward <edward@roojs.com>
Wed, 27 Apr 2016 02:36:19 +0000 (10:36 +0800)
committeredward <edward@roojs.com>
Wed, 27 Apr 2016 02:36:19 +0000 (10:36 +0800)
Roo/bootstrap/Menu.js

index 03d876d..3698b5e 100644 (file)
@@ -133,12 +133,26 @@ Roo.extend(Roo.bootstrap.Menu, Roo.bootstrap.Component,  {
         this.triggerEl.on(Roo.isTouch ? 'touchstart' : 'mouseup', this.onTriggerPress, this);
         
         this.triggerEl.addClass('dropdown-toggle');
-        this.el.on(Roo.isTouch ? 'touchstart' : 'click' , this.onClick, this);
+        
+        if (Roo.isTouch) {
+            this.el.on('touchstart'  , this.onTouch, this);
+        }
+        this.el.on('click' , this.onClick, this);
 
         this.el.on("mouseover", this.onMouseOver, this);
         this.el.on("mouseout", this.onMouseOut, this);
         
         
+        
+//        this.triggerEl.on(Roo.isTouch ? 'touchstart' : 'mouseup', this.onTriggerPress, this);
+//        
+//        this.triggerEl.addClass('dropdown-toggle');
+//        this.el.on(Roo.isTouch ? 'touchstart' : 'click' , this.onClick, this);
+//
+//        this.el.on("mouseover", this.onMouseOver, this);
+//        this.el.on("mouseout", this.onMouseOut, this);
+        
+        
     },
     findTargetItem : function(e){
         var t = e.getTarget(".dropdown-menu-item", this.el,  true);
@@ -164,7 +178,6 @@ Roo.extend(Roo.bootstrap.Menu, Roo.bootstrap.Component,  {
     onClick : function(e){
         Roo.log("menu.onClick");
         var t = this.findTargetItem(e);
-        Roo.log(t);
         if(!t || t.isContainer){
             return;
         }