Roo/bootstrap/TabPanel.js
authoredward <edward@roojs.com>
Tue, 17 Oct 2017 04:08:58 +0000 (12:08 +0800)
committeredward <edward@roojs.com>
Tue, 17 Oct 2017 04:08:58 +0000 (12:08 +0800)
Roo/bootstrap/TabPanel.js

index d40d5b4..9b12b20 100644 (file)
@@ -52,7 +52,6 @@ Roo.extend(Roo.bootstrap.TabPanel, Roo.bootstrap.Component,  {
     html: false,
     tabId: false,
     navId : false,
-    swiping : true,
     href : '',
     
     getAutoCreate : function(){
@@ -98,7 +97,7 @@ Roo.extend(Roo.bootstrap.TabPanel, Roo.bootstrap.Component,  {
             this.el.on('click', this.onClick, this);
         }
         
-        if(Roo.isTouch && this.swiping){
+        if(Roo.isTouch){
             this.el.on("touchstart", this.onTouchStart, this);
             this.el.on("touchmove", this.onTouchMove, this);
             this.el.on("touchend", this.onTouchEnd, this);
@@ -137,7 +136,7 @@ Roo.extend(Roo.bootstrap.TabPanel, Roo.bootstrap.Component,  {
     startY : 0,
     endX : 0,
     endY : 0,
-    
+    swiping : false,
     
     onTouchStart : function(e)
     {
@@ -151,6 +150,8 @@ Roo.extend(Roo.bootstrap.TabPanel, Roo.bootstrap.Component,  {
     {
         e.preventDefault();
         
+        this.swiping = true;
+        
         this.endX = e.browserEvent.touches[0].clientX;
         this.endY = e.browserEvent.touches[0].clientY;
     },