From 81676e6ef798422fed45b461bf80d1ebeef9fc33 Mon Sep 17 00:00:00 2001 From: Andy Joslin Date: Fri, 25 Apr 2014 06:49:17 -0600 Subject: [PATCH] fix(ionList): disable swiping of items while option buttons are shown Addresses #1202 --- js/angular/directive/list.js | 3 ++- test/html/list.html | 14 ++++++++++---- test/unit/angular/directive/list.unit.js | 20 +++++++++++++++++--- 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/js/angular/directive/list.js b/js/angular/directive/list.js index 6801550da0d..c6f71c35c86 100644 --- a/js/angular/directive/list.js +++ b/js/angular/directive/list.js @@ -134,6 +134,7 @@ function($animate, $timeout) { if (!isShown && !wasShown) { return; } if (isShown) listCtrl.closeOptionButtons(); + listCtrl.canSwipeItems(!isShown); $element.children().toggleClass('list-left-editing', isShown); toggleNgHide('.item-delete.item-left-edit', isShown); @@ -146,7 +147,7 @@ function($animate, $timeout) { if (!isShown && !wasShown) { return; } if (isShown) listCtrl.closeOptionButtons(); - listCtrl.showReorder(isShown); + listCtrl.canSwipeItems(!isShown); $element.children().toggleClass('list-right-editing', isShown); toggleNgHide('.item-reorder.item-right-edit', isShown); diff --git a/test/html/list.html b/test/html/list.html index b324ed51dc2..9f2f6cdbb97 100644 --- a/test/html/list.html +++ b/test/html/list.html @@ -41,9 +41,7 @@

Ionic Delete/Option Buttons

-->
@@ -80,7 +78,15 @@

Item {{ item.id }}