diff --git a/js/ext/angular/src/directive/ionicList.js b/js/ext/angular/src/directive/ionicList.js index 591c1fd7ab..6b3b1a3d23 100644 --- a/js/ext/angular/src/directive/ionicList.js +++ b/js/ext/angular/src/directive/ionicList.js @@ -214,6 +214,7 @@ angular.module('ionic.ui.list', ['ngAnimate']) link: function($scope, $element, $attr, ionicScrollCtrl) { $scope.listView = new ionic.views.ListView({ + canSwipe: $scope.canSwipe !== "false" && !!$scope.optionButtons(), el: $element[0], listEl: $element[0].children[0], scrollEl: ionicScrollCtrl && ionicScrollCtrl.element, diff --git a/js/ext/angular/test/sideMenu.html b/js/ext/angular/test/sideMenu.html index df370727cf..9d7873f578 100644 --- a/js/ext/angular/test/sideMenu.html +++ b/js/ext/angular/test/sideMenu.html @@ -14,14 +14,17 @@
- +

Slide me

- +
Hello

Content

+ + Sup +
diff --git a/js/views/listView.js b/js/views/listView.js index aaf47dbcc5..9613b43761 100644 --- a/js/views/listView.js +++ b/js/views/listView.js @@ -315,7 +315,8 @@ opts = ionic.extend({ onReorder: function(el, oldIndex, newIndex) {}, virtualRemoveThreshold: -200, - virtualAddThreshold: 200 + virtualAddThreshold: 200, + canSwipe: false }, opts); ionic.extend(this, opts); @@ -505,6 +506,10 @@ _handleDrag: function(e) { var _this = this, content, buttons; + if (!this.canSwipe) { + return; + } + if(Math.abs(e.gesture.deltaY) > 5) { this._didDragUpOrDown = true; }