{ "id": "149879", "key": "TIMOB-19253", "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": [ { "id": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-05-13T20:52:30.000+0000", "created": "2015-07-24T05:34:13.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "qe-5.4.0" ], "versions": [], "issuelinks": [], "assignee": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-06-22T17:11:29.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": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Test code:\r\n\r\n{code:java}\r\nvar win = Ti.UI.createWindow({backgroundColor: 'white'});\r\nvar listViewEditing = false;\r\nvar listView = Ti.UI.createListView({editing: listViewEditing, height: 100, top: 20});\r\nvar sections = [];\r\n\r\nvar fruitSection = Ti.UI.createListSection({ headerTitle: 'Fruits'});\r\nvar fruitDataSet = [\r\n {properties: { title: 'Apple', canEdit: true}},\r\n {properties: { title: 'Banana'}},\r\n];\r\nfruitSection.setItems(fruitDataSet);\r\nsections.push(fruitSection);\r\n\r\nlistView.sections = sections;\r\n\r\nlistView.addEventListener('itemclick', function() {\r\n\talert(\"itemclick\");\r\n\t// BUG: this only fires when listView.editing is false\r\n});\r\n\r\nwin.add(listView);\r\n\r\nvar button = Ti.UI.createButton({title: \"Toggle editing\"});\r\nbutton.addEventListener('click', function() {\r\n\tlistViewEditing = !listViewEditing;\r\n\tlistView.editing = listViewEditing;\r\n});\r\nwin.add(button);\r\n\r\nwin.open();\r\n\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "iOS: Clicking a list item while editing the list does not fire itemclick event", "creator": { "name": "bearus", "key": "bearus", "displayName": "Be Rushton", "active": true, "timeZone": "Australia/Brisbane" }, "subtasks": [], "reporter": { "name": "bearus", "key": "bearus", "displayName": "Be Rushton", "active": true, "timeZone": "Australia/Brisbane" }, "environment": null, "closedSprints": [ { "id": 631, "state": "closed", "name": "2016 Sprint 11 SDK", "startDate": "2016-05-21T00:06:10.029Z", "endDate": "2016-06-04T00:06:00.000Z", "completeDate": "2016-06-06T07:30:39.854Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "384978", "author": { "name": "bearus", "key": "bearus", "displayName": "Be Rushton", "active": true, "timeZone": "Australia/Brisbane" }, "body": "Anyone going to look at this?", "updateAuthor": { "name": "bearus", "key": "bearus", "displayName": "Be Rushton", "active": true, "timeZone": "Australia/Brisbane" }, "created": "2016-05-06T10:05:39.000+0000", "updated": "2016-05-06T10:05:39.000+0000" }, { "id": "385217", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~morahman] did you check this out on tableview?\r\n[~apetkov] can do some research here. But from what I know, I think for iOS in edit mode, natively, it's not possible to fire an item click event, but instead it enters a mode where you can select files. If so, the docs may need some additional instructions. ", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-05-10T02:04:35.000+0000", "updated": "2016-05-10T02:04:35.000+0000" }, { "id": "385310", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello [~cng], I have tested in tableview. I see this is also happening for tableview. Tableview click event does not fired with \"editing : true\" in tableview.\r\n\r\n{code}\r\nTi.UI.backgroundColor = 'white';\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar tableData = [{\r\n title : 'Apples'\r\n}, {\r\n title : 'Bananas'\r\n}, {\r\n title : 'Carrots'\r\n}, {\r\n title : 'Potatoes'\r\n}];\r\n\r\nvar table = Ti.UI.createTableView({\r\n data : tableData,\r\n editing : true\r\n});\r\nwin.add(table);\r\ntable.addEventListener('click', function() {\r\n\r\n alert(\"itemclick\");\r\n\r\n // BUG: this only fires when TableView.editing is false\r\n\r\n});\r\nwin.open(); \r\n{code}\r\n\r\nRegards,\r\nSharif.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-05-10T17:36:29.000+0000", "updated": "2016-05-10T17:36:29.000+0000" }, { "id": "385328", "author": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "On iOS theres a property called \"AllowsSelectionDuringEditing\" which is by default set to false. Introducing the property fixes the issues.\r\n\r\nPR: https://github.com/appcelerator/titanium_mobile/pull/7995/files\r\n\r\n{code:javascript}\r\nTi.UI.backgroundColor = 'white';\r\nvar win = Ti.UI.createWindow();\r\n \r\nvar listView = Ti.UI.createListView({\r\n\theaderTitle : \"ListView\",\r\n\theight \t : \"50%\", \r\n\ttop : 0, \r\n\tediting : true,\r\n\tallowsSelectionDuringEditing : true,\r\n});\r\n \r\nvar sections = [];\r\n \r\nvar fruitSection = Ti.UI.createListSection({ headerTitle: 'Fruits'});\r\nvar fruitDataSet = [\r\n {properties: { title: 'Apple', canEdit: true}},\r\n {properties: { title: 'Banana', canEdit: true}},\r\n {properties: { title: 'Apple', canEdit: true}},\r\n {properties: { title: 'Banana', canEdit: true}},\r\n {properties: { title: 'Apple', canEdit: true}}, \r\n {properties: { title: 'Banana', canEdit: true}}\r\n \r\n];\r\nfruitSection.setItems(fruitDataSet);\r\nsections.push(fruitSection);\r\n \r\nlistView.sections = sections;\r\n \r\nlistView.addEventListener('itemclick', function() {\r\n\talert(\"itemclick\");\r\n\t// BUG: this only fires when listView.editing is false\r\n});\r\n \r\n \r\nvar tableData = [{\r\n title : 'Apples'\r\n}, {\r\n title : 'Bananas'\r\n}, {\r\n title : 'Carrots'\r\n}, {\r\n title : 'Potatoes'\r\n}];\r\n \r\nvar table = Ti.UI.createTableView({\r\n\theaderTitle : \"TableView\",\r\n data \t\t: tableData,\r\n height \t\t: \"50%\",\r\n bottom \t\t: \"0\",\r\n editing \t: true,\r\n allowsSelectionDuringEditing : true\r\n \r\n});\r\n \r\ntable.addEventListener('click', function() {\r\n alert(\"itemclick\");\r\n});\r\nwin.add(listView);\r\nwin.add(table);\r\nwin.open(); \r\n{code}\r\n\r\n", "updateAuthor": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-05-10T20:48:33.000+0000", "updated": "2016-05-10T21:28:55.000+0000" }, { "id": "385331", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "There already is this property for the Ti.UI.TableView: http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TableView-property-allowsSelectionDuringEditing\r\n\r\nSo two things:\r\n- Remove the tableview-implementation from your PR, its a duplicate\r\n- Make sure the default behavior matches the iOS behavior\r\n- Provide default values in the setters\r\n\r\n[~bearus] Can you verify that PR works for you?", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-05-10T21:10:28.000+0000", "updated": "2016-05-10T21:10:28.000+0000" }, { "id": "385332", "author": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Ah yeah i didn't see my bad, thanks. \r\nUpdated the PR : \r\n* Removed the table view implementation \r\n* Renamed the list view implementation to mach the table view property. \r\n* Added default setters.", "updateAuthor": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-05-10T21:31:54.000+0000", "updated": "2016-05-10T21:31:54.000+0000" }, { "id": "388850", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "Verified as fixed, ListView and TableViews can fire itemclick events during editing when {{allowsSelectionDuringEditing}} is set to true. The default when this property is not set is {{false}}.\r\n\r\nTested On:\r\niPhone 6S (9.3.2) Device \r\nMac OSX El Capitan 10.11.5 \r\nTi SDK: 5.4.0.v20160617074028\r\nAppc Studio: 4.7.0.201606150733\r\nAppc NPM: 4.2.7-2\r\nApp CLI: 5.4.0-18\r\nXcode 7.3\r\nNode v4.2.6\r\n\r\n*Closing ticket.*", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-06-22T17:11:15.000+0000", "updated": "2016-06-22T17:11:15.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }