{ "id": "121203", "key": "TIMOB-15540", "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": "15703", "description": "2013 Sprint 22", "name": "2013 Sprint 22", "archived": true, "released": true, "releaseDate": "2013-11-01" }, { "id": "15704", "description": "2013 Sprint 22 API", "name": "2013 Sprint 22 API", "archived": true, "released": true, "releaseDate": "2013-11-01" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-01-07T18:26:47.000+0000", "created": "2013-10-15T08:17:32.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "module_tableview", "qe-testadded", "triage" ], "versions": [ { "id": "15593", "description": "Release 3.1.3", "name": "Release 3.1.3", "archived": true, "released": true, "releaseDate": "2013-09-18" } ], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-02-12T10:35:21.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": "h4. Problem Description\r\nThe source of events like click, singletap, are not being reported. Instead, you get random internal information. \r\n\r\nh4. Steps to Reproduce\r\n1. Create new mobile project with 3.1.3 in iOS\r\n2. Paste the testcase to app.js\r\n3. Run the app, click on the row.\r\n4. You will see the source. \r\n\r\nh4. Testcase\r\n{code}\r\nvar rowdata = [\r\n{title: 'row_0'},\r\n{title: 'row_1'},\r\n{title: 'row_2'},\r\n];\r\nvar win = Ti.UI.createWindow( { backgroundColor: '#FFFFFF' } );\r\nvar table = Ti.UI.createTableView( { data: rowdata } );\r\n\r\n// Either:\r\n\r\ntable.addEventListener('singletap', eventArrived);\r\n//table.addEventListener('doubletap', eventArrived);\r\n\r\n// Or:\r\n\r\n//table.addEventListener('click', eventArrived);\r\n\r\nwin.add(table);\r\nwin.open();\r\n\r\nfunction eventArrived(e) {\r\nalert('Event from table: ' + JSON.stringify(e));\r\n}\r\n{code}\r\n\r\nh4. Extra info\r\nWith singletap and doubletap events, the event contains no row information:\r\n\r\n[TRACE] : Event from table: {'x':222,'y':31,'bubbles':true,'type':'singletap','source':{'hideSearchOnSelection':true,'horizontalWrap':true,'searchHidden':false},'cancelBubble':false}\r\n[TRACE] : Event from table: {'x':91,'y':61,'bubbles':true,'type':'singletap','source':{'hideSearchOnSelection':true,'horizontalWrap':true,'searchHidden':false},'cancelBubble':false}\r\n[TRACE] : Event from table: {'x':145,'y':101,'bubbles':true,'type':'singletap','source':{'hideSearchOnSelection':true,'horizontalWrap':true,'searchHidden':false},'cancelBubble':false}\r\n[TRACE] : Event from table: {'x':137,'y':22,'bubbles':true,'type':'doubletap','source':{'hideSearchOnSelection':true,'horizontalWrap':true,'searchHidden':false},'cancelBubble':false}\r\n[TRACE] : Event from table: {'x':130,'y':73,'bubbles':true,'type':'doubletap','source':{'hideSearchOnSelection':true,'horizontalWrap':true,'searchHidden':false},'cancelBubble':false}\r\n[TRACE] : Event from table: {'x':129,'y':100,'bubbles':true,'type':'doubletap','source':{'hideSearchOnSelection':true,'horizontalWrap':true,'searchHidden':false},'cancelBubble':false}\r\n\r\nWith click events, the event object correctly contains row information:\r\n\r\n[TRACE] : Event from table: {'x':122,'section':{'horizontalWrap':true},'row':{'horizontalWrap':true,'title':'row_0'},'index':0,'y':36,'rowData':{'horizontalWrap':true,'title':'row_0'},'searchMode':false,'detail':false,'bubbles':true,'type':'click','source':{'horizontalWrap':true,'title':'row_0'},'cancelBubble':false}\r\n[TRACE] : Event from table: {'x':135,'section':{'horizontalWrap':true},'row':{'horizontalWrap':true,'title':'row_1'},'index':1,'y':9,'rowData':{'horizontalWrap':true,'title':'row_1'},'searchMode':false,'detail':false,'bubbles':true,'type':'click','source':{'horizontalWrap':true,'title':'row_1'},'cancelBubble':false}\r\n[TRACE] : Event from table: {'x':166,'section':{'horizontalWrap':true},'row':{'horizontalWrap':true,'title':'row_2'},'index':2,'y':23,'rowData':{'horizontalWrap':true,'title':'row_2'},'searchMode':false,'detail':false,'bubbles':true,'type':'click','source':{'horizontalWrap':true,'title':'row_2'},'cancelBubble':false}\r\n\r\n\r\nh4. Expected Result\r\nRow information from singletap, doubletap, and click events (as per current API documentation).", "attachment": [ { "id": "43183", "filename": ".log", "author": { "name": "rudolf@pobox.com", "key": "rudolf@pobox.com", "displayName": "Rudolf Cardinal", "active": true, "timeZone": "Europe/London" }, "created": "2013-10-15T08:17:36.000+0000", "size": 1355063, "mimeType": "application/octet-stream; charset=ISO-8859-1" }, { "id": "43185", "filename": "bugtest_table_events.js", "author": { "name": "rudolf@pobox.com", "key": "rudolf@pobox.com", "displayName": "Rudolf Cardinal", "active": true, "timeZone": "Europe/London" }, "created": "2013-10-15T08:17:40.000+0000", "size": 2878, "mimeType": "application/octet-stream; charset=ISO-8859-1" }, { "id": "43184", "filename": "diagnostic7873121913403312023.log", "author": { "name": "rudolf@pobox.com", "key": "rudolf@pobox.com", "displayName": "Rudolf Cardinal", "active": true, "timeZone": "Europe/London" }, "created": "2013-10-15T08:17:40.000+0000", "size": 13624, "mimeType": "application/octet-stream; charset=ISO-8859-1" } ], "flagged": false, "summary": "iOS7: TableView singletap and doubletap events do not provide row information", "creator": { "name": "rudolf@pobox.com", "key": "rudolf@pobox.com", "displayName": "Rudolf Cardinal", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "rudolf@pobox.com", "key": "rudolf@pobox.com", "displayName": "Rudolf Cardinal", "active": true, "timeZone": "Europe/London" }, "environment": "Titanium Studio 3.1.3", "comment": { "comments": [ { "id": "275874", "author": { "name": "cornflakesuperstar", "key": "cornflakesuperstar", "displayName": "Jason Kotchoff", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is critical priority for us. Our app needs to use singletap listeners (instead of click listeners) on our table rows and this bug makes that functionality inoperable.\r\n\r\nInterestingly, you will note that when the tablerow has elements stacked on top of it, tapping those elements does indeed fire the event with row information.\r\n\r\nAs such, a potential temporary workaround until Appcelerator fix this is to create a full-width transparent view on the table row and then use a custom label instead of a 'title' attribute when building the table row.\r\n\r\neg.\r\nvar row = Ti.UI.createTableViewRow({hasChild: true, height: 44});\r\n\r\n// This view ensures that when the row is tapped, the event that is fired contains a 'row' property. Assumedly, you would build this with a transparent background.\r\nrow.add(Ti.UI.createView({width: '100%', height: 44, backgroundColor: 'yellow'})); \r\n\r\n// If the view above is not present, tapping this element fires the event with the row property. Tapping elsewhere on the row fires the event without the row property.\r\nrow.add(Ti.UI.createLabel({ text : 'row_x', left: 7, width: 100, backgroundColor: 'gray' }));\r\n\r\nvar rowdata = [ row ];\r\n...\r\n\r\nNote: this workaround still doesn't include the row property in the event if the 'hasChild' arrow is tapped.", "updateAuthor": { "name": "cornflakesuperstar", "key": "cornflakesuperstar", "displayName": "Jason Kotchoff", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-21T03:27:32.000+0000", "updated": "2013-10-21T03:27:32.000+0000" }, { "id": "275955", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thank you for the report. We will discuss this for inclusion in the next release.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-21T16:15:08.000+0000", "updated": "2013-10-21T16:15:08.000+0000" }, { "id": "277427", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending against master\r\nhttps://github.com/appcelerator/titanium_mobile/pull/4891", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-10-30T22:53:18.000+0000", "updated": "2013-10-30T22:53:18.000+0000" }, { "id": "278614", "author": { "name": "muralinr", "key": "muralinr", "displayName": "Murali Rama", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Vishal,\r\nWhen will TI SDK update available with this fix? Thanks.", "updateAuthor": { "name": "muralinr", "key": "muralinr", "displayName": "Murali Rama", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-07T06:14:47.000+0000", "updated": "2013-11-07T06:14:47.000+0000" }, { "id": "278648", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~muralinr] Version 3.2.0 as noted in the \"Fix Version\" field. Likely early December.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-07T16:47:21.000+0000", "updated": "2013-11-07T16:47:21.000+0000" }, { "id": "279529", "author": { "name": "prastogi", "key": "prastogi", "displayName": "Pragya Rastogi", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Tested and verified the fix with:\r\nOSX: 10.8.5\r\nXcode:5.0\r\nAppcelerator Studio: 3.2.0.201311122338\r\nSDK: 3.2.0.v20131113183932\r\nacs:1.0.7\r\nalloy:1.3.0\r\nnpm:1.3.2\r\ntitanium:3.2.0\r\ntitanium-code-processo:1.0.3\r\nDevice: iOS7(v7.0.3)-iPodTouch1", "updateAuthor": { "name": "prastogi", "key": "prastogi", "displayName": "Pragya Rastogi", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-11-14T11:06:20.000+0000", "updated": "2013-11-14T11:06:20.000+0000" }, { "id": "286344", "author": { "name": "muralinr", "key": "muralinr", "displayName": "Murali Rama", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I still see this issue on TI SDK 3.2.0 version. When will this issue be fixed and released? Thanks. ", "updateAuthor": { "name": "muralinr", "key": "muralinr", "displayName": "Murali Rama", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-31T07:04:01.000+0000", "updated": "2013-12-31T07:04:01.000+0000" }, { "id": "286362", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "If you still see this issue, please provide a test case that demonstrates it. There may be an edge case we missed.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-31T15:16:11.000+0000", "updated": "2013-12-31T15:16:11.000+0000" }, { "id": "286411", "author": { "name": "muralinr", "key": "muralinr", "displayName": "Murali Rama", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Here is test case (app.js) and steps to reproduce this issue:\r\n{code}\r\nTi.UI.setBackgroundColor('#000');\r\n \r\nvar win = Ti.UI.createWindow({\r\n title : 'TableView Bug',\r\n});\r\n\r\nfunction makeRow () {\r\n \r\n var row = Ti.UI.createTableViewRow({\t\t\r\n\t\t//objName: 'row',\r\n\t\theight:45\r\n\t});\r\n\t\r\n\tvar primaryLabelwidth = 160;\r\n\tvar primaryLabel = Ti.UI.createLabel({\r\n\t\ttext:\"label1\",\r\n\t\ttop:0,\r\n\t\tleft:15,\r\n\t\theight:30\r\n\t});\r\n\t\r\n\trow.add(primaryLabel);\r\n\t\t\r\n\t\tvar unitsLabel = Ti.UI.createLabel({\r\n\t\t\ttext:\"YY\",\r\n\t\t\ttop:0,\r\n\t\t\tright:49,\r\n\t\t\theight:40,\r\n\t\t\twidth:42\r\n\t\t});\r\n\t\trow.add(unitsLabel);\r\n\t\treturn row; \r\n}\r\n\r\nvar table1 = Ti.UI.createTableView({\r\n top:60,\r\n\t left:0,\r\n\t right:20,\r\n\t bottom:40,\r\n\t editable:true,\t// 'swipe to delete' on iPhone is the default if you set editable:true in the createTableview command.\r\n\t moveable:true,\r\n\t longpressIsActive: false,\r\n\t objectName: 'table',\r\n\t visible: true\r\n});\r\n\r\nvar refreshTableItems = function(){\r\n\t var test_index = 0;\r\n\t \r\n\t Ti.API.info('Reached: ');\r\n \t\twhile (test_index < 5) { \r\n\t\t\t\r\n\t\t\trow = makeRow ();\r\n\t\t\t//Shopping list name added to the master table of shopping lists as a specific row\r\n\t\t\ttable1.appendRow (row);\r\n\t\t\ttest_index = test_index + 1;\r\n\t } \r\n Ti.API.info('while loop ended: ');\r\n };\r\n refreshTableItems();\r\n \r\ntable1.addEventListener('click', function(e) {\r\n Ti.API.info(\"e.row =\" + e.row + \", e.source = \" + e.source);\r\n});\r\nwin.add(table1);\r\nwin.open();\r\n\r\n{code}\r\nSteps to reproduce this issue: \r\n1. Create a new mobile project for iOS7, with 3.2.0.GA\r\n2. Paste the testcase into app.js\r\n3. Run in the simulator\r\n4. Click on the first row.\r\n5. Click on the second row. \r\n6. Check console, you will see the difference, even if you created the two rows in the same way.\r\n\r\nLog file when YY label is clicked in TableView:\r\nFirst row output:\r\n[INFO] e.row =[object TiUITableViewRow], e.source = [object TiUITableViewRow]\r\n\r\nSecond or any other row is clicked: \r\n[INFO] e.row =[object TiUITableViewRow], e.source = [object TiUILabel]", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-01T06:18:45.000+0000", "updated": "2014-01-07T18:10:38.000+0000" }, { "id": "286884", "author": { "name": "muralinr", "key": "muralinr", "displayName": "Murali Rama", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hello, Is there any update on above test code? When will this issue be fixed? Thanks.", "updateAuthor": { "name": "muralinr", "key": "muralinr", "displayName": "Murali Rama", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-07T05:17:15.000+0000", "updated": "2014-01-07T05:17:15.000+0000" }, { "id": "286983", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening based on comments", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-07T17:30:15.000+0000", "updated": "2014-01-07T17:30:15.000+0000" }, { "id": "286998", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-07T18:22:52.000+0000", "updated": "2014-01-07T18:22:52.000+0000" }, { "id": "288985", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Appc Studio:3.2.1.201401151647\r\nSdk:3.2.1.v20140117222448\r\nalloy:1.3.1-beta2\t\r\ntitanium:3.2.1(from cli)\r\nacs:1.0.11\r\ntitanium-code-processor:1.1.0\r\nOsx: Maverick 10.9\r\nXcode:5.0.2\r\nDevice:iPhone5c(v7.0.4)\r\n\r\nSingleTap and DoubleTap working for tableView.\r\nHence Closing the issue.", "updateAuthor": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-21T07:33:10.000+0000", "updated": "2014-01-21T07:33:10.000+0000" } ], "maxResults": 13, "total": 13, "startAt": 0 } } }