{ "id": "136276", "key": "TIMOB-19526", "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": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2019-12-09T23:24:27.000+0000", "created": "2014-09-09T10:06:51.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "TCSupportTriage", "engTriage" ], "versions": [ { "id": "16919", "description": "Critical updates", "name": "Release 4.1.1", "archived": true, "released": true, "releaseDate": "2015-07-15" } ], "issuelinks": [], "assignee": null, "updated": "2019-12-09T23:24:27.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [], "description": "When \"allowsSelection\" is set to \"false\" (which means, rows should not show color which means they are selected), \"itemclick\" event is not fired. I think that is wrong, selection is one thing, clicking on whole list view is whole other thing and it should not be affected by \"allowsSelection\" property.\r\n\r\n\r\nTo see this issue, run this code:\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({backgroundColor: 'white', top: 20});\r\nvar listView = Ti.UI.createListView({\r\n\tallowsSelection: false\r\n});\r\nvar sections = [];\r\n\r\nvar fruitSection = Ti.UI.createListSection({ headerTitle: 'Fruits'});\r\nvar fruitDataSet = [\r\n {properties: { title: 'Apple'}},\r\n {properties: { title: 'Banana'}},\r\n];\r\nfruitSection.setItems(fruitDataSet);\r\nsections.push(fruitSection);\r\n\r\nvar vegSection = Ti.UI.createListSection({ headerTitle: 'Vegetables'});\r\nvar vegDataSet = [\r\n {properties: { title: 'Carrots'}},\r\n {properties: { title: 'Potatoes'}},\r\n];\r\nvegSection.setItems(vegDataSet);\r\nsections.push(vegSection);\r\n\r\nlistView.setSections(sections);\r\n\r\nlistView.addEventListener('itemclick', function(e) {\r\n\talert(e);\r\n});\r\n\r\nwin.add(listView);\r\nwin.open();\r\n{code}\r\n\r\nClick on some row - you should not see alert dialog (and IMO you should).", "attachment": [], "flagged": false, "summary": "ListView - setting \"allowsSelection\" to \"false\" disables \"itemclick\" event", "creator": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "* TiSDK 3.3.0.GA\r\n* iOS 7.1\r\n* TiCLI 3.3.0\r\n* Xcode 5.1.1", "comment": { "comments": [ { "id": "340258", "author": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "body": "While the ticket title is true, the solution is to have allowsSelection=true and set\r\n{code}selectionStyle:Ti.UI.iPhone.ListViewCellSelectionStyle.NONE{code}\r\nfor every ListViewItem.", "updateAuthor": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "created": "2015-01-22T17:53:25.000+0000", "updated": "2015-01-22T17:53:25.000+0000" }, { "id": "340408", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Ahh, that workaround is hard to notice, thanks for pointing it out!", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-01-23T10:31:32.000+0000", "updated": "2015-01-23T10:31:32.000+0000" }, { "id": "453109", "author": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as \"Won't fix. when setting *allowsSelection* to *false* itemclick events will not fire. This is by design.", "updateAuthor": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-12-09T23:24:27.000+0000", "updated": "2019-12-09T23:24:27.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }