From 40cc28da53ed5cebb31c555fe8727db830eee3bb Mon Sep 17 00:00:00 2001 From: Vijay Vikram Singh Date: Wed, 8 Jul 2020 15:06:50 -0700 Subject: [PATCH] fix(ios): itemclick event its firing instead of a move event when ordering items in a list iOS 13+ (#11805) Co-authored-by: ssekhri --- iphone/Classes/TiUIListView.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/iphone/Classes/TiUIListView.m b/iphone/Classes/TiUIListView.m index 5df400428cd..6aeea9d7591 100644 --- a/iphone/Classes/TiUIListView.m +++ b/iphone/Classes/TiUIListView.m @@ -1875,7 +1875,12 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath - (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath { - [self fireClickForItemAtIndexPath:[self pathForSearchPath:indexPath] tableView:tableView accessoryButtonTapped:YES]; + // TIMOB-27994: This delegate should called only when accessory detail button is clicked. + // If tableView is in edit mode, accessory buttons (detail button) does not appear. + // But in iOS 13+, On click of 'reorder control' this delegate is called (probably a bug). So following condition applied. + if (!tableView.isEditing) { + [self fireClickForItemAtIndexPath:[self pathForSearchPath:indexPath] tableView:tableView accessoryButtonTapped:YES]; + } } #pragma mark - ScrollView Delegate