{ "id": "129578", "key": "TIMOB-16898", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2014-04-23T12:31:10.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "cancelBubble", "event", "ios", "itemclick", "listview", "swipe" ], "versions": [ { "id": "15857", "description": "Release 3.2.2", "name": "Release 3.2.2", "archived": false, "released": true, "releaseDate": "2014-03-09" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:33.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "On a ListView with a 'swipe' event, when cancelBubble is enabled on the 'swipe' event, it does not prevent the sequential 'itemclick' event from firing.\r\n\r\nThis issue is also documented on the following Q/A (second answer): http://developer.appcelerator.com/question/152014\r\n\r\nTest:\r\nLoad the sample code and swipe left or right on a row item. Both swipe and itemclick events are logged on the console.\r\n\r\nExpected result: \r\nSince the swipe event sets cancelBubble = true, the itemclick event should not be fired, and the row item should not be selected.\r\n\r\nUse case: \r\nA swipe event that does not trigger an itemclick can be required on some cases, like swiping a slide menu (listview) to hide it from the screen without having one of its items register a click. \r\n\r\napp.js\r\n{code}\r\n\r\nvar rows = [];\r\nfor (var i = 0; i < 10; i++) {\r\n rows.push({ properties: { title: 'Row '+ i }});\r\n}\r\n\r\n\r\nvar win = Ti.UI.createWindow({\r\n\ttitle: 'TEST',\r\n\tbackgroundColor: '#ffffff',\r\n\tnavBarHidden: false\r\n});\r\n\r\nvar nav = Ti.UI.iOS.createNavigationWindow({ window: win });\r\n\r\n\r\nvar ls = Ti.UI.createListSection({\r\n\titems: rows\r\n});\r\n\r\n\r\nvar lv = Ti.UI.createListView({\r\n sections: [ls]\r\n});\r\n\r\n\r\nlv.addEventListener('itemclick', function(e) {\r\n\tTi.API.info('itemclick fired!');\r\n});\r\n\r\n\r\nlv.addEventListener('swipe', function(e) {\r\n\te.cancelBubble = true;\r\n\tTi.API.info('swipe fired!');\r\n});\r\n\r\nwin.add(lv);\r\nnav.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: ListView: cancelBubble = true on swipe does not prevent itemclick event from firing", "creator": { "name": "bcproductions", "key": "bcproductions", "displayName": "Ed", "active": true, "timeZone": "America/Havana" }, "subtasks": [], "reporter": { "name": "bcproductions", "key": "bcproductions", "displayName": "Ed", "active": true, "timeZone": "America/Havana" }, "environment": "Ti SDK v3.2.2GA, iOS 7.1, Simulator 7.1", "comment": { "comments": [ { "id": "303008", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving this ticket to engineering as I can reproduce this issue with the provided test case. This issue was also actively discussed on Q&A thread as noted in the ticket. ", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-30T05:21:54.000+0000", "updated": "2014-04-30T05:21:54.000+0000" }, { "id": "320530", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue still exists with SDK Version 3.2.2 and 3.4.0\r\n\r\nTitanium Command-Line Interface, \r\nCLI version 3.3.0, \r\nTitanium SDK version 3.2.2.GA \r\nTitanium SDK version 3.4.0.GA \r\nAppcelerator Studio, build: 3.3.0.201407111535 \r\niOS SDK: 7.1 \r\niOS iPhone Simulator: 7.1", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-27T06:51:09.000+0000", "updated": "2014-08-27T06:51:09.000+0000" }, { "id": "328659", "author": { "name": "yeelan0319", "key": "yeelan0319", "displayName": "Yiran Mao", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Ingo,\r\n\r\nStill see this happened in SDK 3.4.0GA. And it is not only limited to swipe but also event like click within listItem element....\r\nTitanium Studio, build: 3.4.0.201409261227\r\niOS SDK: 8.0\r\niOS iPhone Simulator: 8.0\r\n\r\nIs there any possible way to prevent this from happening? It basically make customized listItem useless and I cannot get why this issue is assigned just low priority.\r\n ", "updateAuthor": { "name": "yeelan0319", "key": "yeelan0319", "displayName": "Yiran Mao", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-20T20:26:58.000+0000", "updated": "2014-10-20T20:26:58.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }