{ "id": "120909", "key": "TIMOB-16219", "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": "2013-10-08T06:25:11.000+0000", "priority": null, "labels": [], "versions": [], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:47.000+0000", "status": { "description": "This issue was once resolved, but the resolution was deemed incorrect. From here issues are either marked assigned or resolved.", "name": "Reopened", "id": "4", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [], "description": "When I press a label in first row of table view, it is returning [object TiUITableViewRow] instead of [object TiUILabel]. All other rows, it is returning correct label [object TiUILabel]. What could be a reason for this issue happening for only first row? This issue happens only with 3.1.3GA version when I compiled for iPhone/iPad.", "attachment": [ { "id": "43259", "filename": "app.js", "author": { "name": "muralinr", "key": "muralinr", "displayName": "Murali Rama", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-17T05:11:56.000+0000", "size": 2729, "mimeType": "application/x-javascript" } ], "flagged": false, "summary": "iOS: Clicking a label in first row of table view is not working", "creator": { "name": "muralinr", "key": "muralinr", "displayName": "Murali Rama", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "muralinr", "key": "muralinr", "displayName": "Murali Rama", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "This issue happens only with 3.1.3GA version when I compiled for iPhone/iPad.", "comment": { "comments": [ { "id": "274143", "author": { "name": "jialhe85@gmail.com", "key": "jialhe85@gmail.com", "displayName": "David He", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Please provide the minimal code that can recreate this issue.", "updateAuthor": { "name": "jialhe85@gmail.com", "key": "jialhe85@gmail.com", "displayName": "David He", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-08T09:02:42.000+0000", "updated": "2013-10-08T09:02:42.000+0000" }, { "id": "274333", "author": { "name": "muralinr", "key": "muralinr", "displayName": "Murali Rama", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I am simulating this problem on minimal code. I will update them in few days.", "updateAuthor": { "name": "muralinr", "key": "muralinr", "displayName": "Murali Rama", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-09T06:11:30.000+0000", "updated": "2013-10-09T06:11:30.000+0000" }, { "id": "274915", "author": { "name": "muralinr", "key": "muralinr", "displayName": "Murali Rama", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hello David,\nHere is minimal code to reproduce this issue.\n\nTi.UI.setBackgroundColor('#000');\n \nvar win = Ti.UI.createWindow({\n title : 'TableView Bug',\n});\n\nfunction makeRow () {\n \n var row = Ti.UI.createTableViewRow({\t\n\t\t//backgroundColor:'transparent',\n\t\tselectionStyle: Titanium.UI.iPhone.TableViewCellSelectionStyle.NONE,\n\t\tobjName: 'row',\n\t\theight:45\n\t});\n\t\n\tvar primaryLabelwidth = 160;\n\tvar primaryLabel = Ti.UI.createLabel({\n\t\ttext:\"label1\",\n\t\ttop:0,\n\t\tleft:15,\n\t\theight:30,\n\t\twidth:primaryLabelwidth, //For iPhone vs. iPad (in Portrait)\n\t\tcolor:'#ffffff',\n\t\telementName: 'primaryLabel',\n\t\ttouchenabled: false,\n //font:{fontSize:16,fontWeight:'bold', fontFamily:'Chalkduster'}\n font:{fontSize:16,fontWeight:'bold', fontFamily:'Helvetica Neue'}\n\t});\n\t\n\t\n\trow.add(primaryLabel);\n\t\n\t//This is how you add the quantity\n\t\t\n\tvar quantityLabel = Ti.UI.createLabel({\n\t\t\ttext:\"1\",\n\t\t\ttop:0,\n\t\t\tright:91,\n\t\t\theight:40,\n\t\t\twidth:20,\n\t\t\t//borderColor:'#ffffff',\n\t\t\ttextAlign: Ti.UI.TEXT_ALIGNMENT_RIGHT,\n\t\t\t //Height width both needed for proper triggering\n\t\t\tcolor:'#ffffff', \n\t\t\telementName: 'Quantity',\n\t\t\t//touchenabled: false,\n\t font:{fontSize:11,fontWeight:'normal', fontStyle: 'italic', fontFamily:'Helvetica Neue'}\n\t });\n\t\trow.add(quantityLabel);\n\t\n\t\tvar unitsLabel = Ti.UI.createLabel({\n\t\t\ttext:\"YY\",\n\t\t\ttop:0,\n\t\t\tright:49,\n\t\t\theight:40,\n\t\t\twidth:42,\n\t\t\t//borderColor:'#ffffff',\n\t\t\ttextAlign: Ti.UI.TEXT_ALIGNMENT_LEFT,\n\t\t\tcolor:'#ffffff', \n\t\t\telementName: 'Units',\n\t\t\t//touchenabled: false,\n\t font:{fontSize:11,fontWeight:'normal', fontStyle: 'italic', fontFamily:'Helvetica Neue'}\n\t\t});\n\t\trow.add(unitsLabel);\n\t\treturn row; \n}\n\n \nvar table1 = Ti.UI.createTableView({\n top:60,\n\t left:0,\n\t right:20,\n\t bottom:40,\n\t style: Ti.UI.iPhone.TableViewStyle.PLAIN,\n\t\tseparatorStyle: Titanium.UI.iPhone.TableViewSeparatorStyle.NONE,\n\t\tseparatorColor: 'transparent',\t \n\t\tbackgroundColor: 'transparent', \t\n\t borderColor:'#e5e5e5',\n\t borderRadius:10,\n\t borderWidth: 0.5,\n\t editable:true,\t// 'swipe to delete' on iPhone is the default if you set editable:true in the createTableview command.\n\t moveable:true,\n\t longpressIsActive: false,\n\t objectName: 'table',\n\t visible: true\n});\n\nvar refreshItemnames = function(){\n\t var test_index = 0;\n\t \n\t Ti.API.info('Reached: ');\n \t\twhile (test_index < 5) { \n\t\t\t\n\t\t\trow = makeRow ();\n\t\t\t//Shopping list name added to the master table of shopping lists as a specific row\n\t\t\ttable1.appendRow (row);\n\t\t\ttest_index = test_index + 1;\n\t } \n Ti.API.info('while loop ended: ');\n };\n refreshItemnames();\n \ntable1.addEventListener('click', function(e) {\n Ti.API.info(\"e.row =\" + e.row + \", e.source = \" + e.source);\n});\nwin.add(table1);\nwin.open();\n\nProblem when first row is clicked (It shows output as follows):\n[INFO] e.row =[object TiUITableViewRow], e.source = [object TiUITableViewRow]\n\nSecond row or any other row clicked (It shows output as follows):\n[INFO] e.row =[object TiUITableViewRow], e.source = [object TiUILabel]", "updateAuthor": { "name": "muralinr", "key": "muralinr", "displayName": "Murali Rama", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-13T04:08:45.000+0000", "updated": "2013-10-13T04:08:45.000+0000" }, { "id": "275252", "author": { "name": "muralinr", "key": "muralinr", "displayName": "Murali Rama", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hello,\nIs there any update on this JIRA ticket?", "updateAuthor": { "name": "muralinr", "key": "muralinr", "displayName": "Murali Rama", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-16T05:42:50.000+0000", "updated": "2013-10-16T05:42:50.000+0000" }, { "id": "275295", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello,\r\n\r\nplease provide a testcase for this. I tested the one in your comment, and is not even compiling. \r\n\r\nBest,\r\n\r\nMauro ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2013-10-16T17:05:55.000+0000", "updated": "2013-10-16T17:05:55.000+0000" }, { "id": "275382", "author": { "name": "muralinr", "key": "muralinr", "displayName": "Murali Rama", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Below code is compiling fine on 3.1.3GA version for iPad/iPhone. Please do not close this issue without resolving it.\n\ntest case (copy below code to app.js):\nTi.UI.setBackgroundColor('#000');\n \nvar win = Ti.UI.createWindow({\n title : 'TableView Bug',\n});\n\nfunction makeRow () {\n \n var row = Ti.UI.createTableViewRow({\t\n\t\t//backgroundColor:'transparent',\n\t\tselectionStyle: Titanium.UI.iPhone.TableViewCellSelectionStyle.NONE,\n\t\tobjName: 'row',\n\t\theight:45\n\t});\n\t\n\tvar primaryLabelwidth = 160;\n\tvar primaryLabel = Ti.UI.createLabel({\n\t\ttext:\"label1\",\n\t\ttop:0,\n\t\tleft:15,\n\t\theight:30,\n\t\twidth:primaryLabelwidth, //For iPhone vs. iPad (in Portrait)\n\t\tcolor:'#ffffff',\n\t\telementName: 'primaryLabel',\n\t\ttouchenabled: false,\n //font:{fontSize:16,fontWeight:'bold', fontFamily:'Chalkduster'}\n font:{fontSize:16,fontWeight:'bold', fontFamily:'Helvetica Neue'}\n\t});\n\t\n\t\n\trow.add(primaryLabel);\n\t\n\t//This is how you add the quantity\n\t\t\n\tvar quantityLabel = Ti.UI.createLabel({\n\t\t\ttext:\"1\",\n\t\t\ttop:0,\n\t\t\tright:91,\n\t\t\theight:40,\n\t\t\twidth:20,\n\t\t\t//borderColor:'#ffffff',\n\t\t\ttextAlign: Ti.UI.TEXT_ALIGNMENT_RIGHT,\n\t\t\t //Height width both needed for proper triggering\n\t\t\tcolor:'#ffffff', \n\t\t\telementName: 'Quantity',\n\t\t\t//touchenabled: false,\n\t font:{fontSize:11,fontWeight:'normal', fontStyle: 'italic', fontFamily:'Helvetica Neue'}\n\t });\n\t\trow.add(quantityLabel);\n\t\n\t\tvar unitsLabel = Ti.UI.createLabel({\n\t\t\ttext:\"YY\",\n\t\t\ttop:0,\n\t\t\tright:49,\n\t\t\theight:40,\n\t\t\twidth:42,\n\t\t\t//borderColor:'#ffffff',\n\t\t\ttextAlign: Ti.UI.TEXT_ALIGNMENT_LEFT,\n\t\t\tcolor:'#ffffff', \n\t\t\telementName: 'Units',\n\t\t\t//touchenabled: false,\n\t font:{fontSize:11,fontWeight:'normal', fontStyle: 'italic', fontFamily:'Helvetica Neue'}\n\t\t});\n\t\trow.add(unitsLabel);\n\t\treturn row; \n}\n\n \nvar table1 = Ti.UI.createTableView({\n top:60,\n\t left:0,\n\t right:20,\n\t bottom:40,\n\t style: Ti.UI.iPhone.TableViewStyle.PLAIN,\n\t\tseparatorStyle: Titanium.UI.iPhone.TableViewSeparatorStyle.NONE,\n\t\tseparatorColor: 'transparent',\t \n\t\tbackgroundColor: 'transparent', \t\n\t borderColor:'#e5e5e5',\n\t borderRadius:10,\n\t borderWidth: 0.5,\n\t editable:true,\t// 'swipe to delete' on iPhone is the default if you set editable:true in the createTableview command.\n\t moveable:true,\n\t longpressIsActive: false,\n\t objectName: 'table',\n\t visible: true\n});\n\nvar refreshItemnames = function(){\n\t var test_index = 0;\n\t \n\t Ti.API.info('Reached: ');\n \t\twhile (test_index < 5) { \n\t\t\t\n\t\t\trow = makeRow ();\n\t\t\t//Shopping list name added to the master table of shopping lists as a specific row\n\t\t\ttable1.appendRow (row);\n\t\t\ttest_index = test_index + 1;\n\t } \n Ti.API.info('while loop ended: ');\n };\n refreshItemnames();\n \ntable1.addEventListener('click', function(e) {\n Ti.API.info(\"e.row =\" + e.row + \", e.source = \" + e.source);\n});\nwin.add(table1);\nwin.open();\n\nLog output :Problem when \"1YY\" label in first row is clicked (It shows output as follows):\n[INFO] e.row =[object TiUITableViewRow], e.source = [object TiUITableViewRow]\n\nLog output when \"1YY\" label in Second row or any other row clicked (It shows output as follows):\n[INFO] e.row =[object TiUITableViewRow], e.source = [object TiUILabel]\n", "updateAuthor": { "name": "muralinr", "key": "muralinr", "displayName": "Murali Rama", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-17T05:18:08.000+0000", "updated": "2013-10-17T05:18:08.000+0000" }, { "id": "286494", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello,\r\n\r\nWe tested this this issue with the code you posted. We can’t reproduce this issue. It’s working fine for me. Its most likely fixed. Please check this code with the latest TiSDK build (TiSDK 3.2.0) and let me know if this problem persists.\r\n\r\nh5. Test Environment\r\n\r\nMac OS X 10.8.5\r\nTi SDK 3.2.0.GA\r\nTi CLI 3.2.0\r\nIOS 7.0.3\r\n", "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-01-02T17:13:19.000+0000", "updated": "2014-01-02T23:39:12.000+0000" }, { "id": "286887", "author": { "name": "muralinr", "key": "muralinr", "displayName": "Murali Rama", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hello,\nI still see this issue with below test code. \n\nHere is test case (app.js) and steps to reproduce this issue:\n\nTi.UI.setBackgroundColor('#000');\n\nvar win = Ti.UI.createWindow({ title : 'TableView Bug', });\n\nfunction makeRow () {\n\nvar row = Ti.UI.createTableViewRow({\t //objName: 'row', height:45 });\n\nvar primaryLabelwidth = 160;\nvar primaryLabel = Ti.UI.createLabel({ text:\"label1\", top:0, left:15, height:30 });\n\nrow.add(primaryLabel);\n\nvar unitsLabel = Ti.UI.createLabel({ text:\"YY\", top:0, right:49, height:40, width:42 });\nrow.add(unitsLabel);\nreturn row; \n}\n\nvar table1 = Ti.UI.createTableView({ top:60, left:0, right:20, bottom:40, editable:true,\t// 'swipe to delete' on iPhone is the default if you set editable:true in the createTableview command. moveable:true, longpressIsActive: false, objectName: 'table', visible: true });\n\nvar refreshTableItems = function(){\nvar test_index = 0;\n\nTi.API.info('Reached: ');\nwhile (test_index < 5) { row = makeRow (); //Shopping list name added to the master table of shopping lists as a specific row table1.appendRow (row); test_index = test_index + 1; } \nTi.API.info('while loop ended: ');\n};\nrefreshTableItems();\n\ntable1.addEventListener('click', function(e) { Ti.API.info(\"e.row =\" + e.row + \", e.source = \" + e.source); });\nwin.add(table1);\nwin.open();\n\nSteps to reproduce this issue: \n1. Create a new mobile project for iOS7, with 3.2.0.GA\n2. Paste the testcase into app.js\n3. Run in the simulator\n4. Click on the first row.\n5. Click on the second row. \n6. Check console, you will see the difference, even if you created the two rows in the same way.\n\nLog file when YY label is clicked in TableView:\nFirst row output:\n[INFO] e.row =[object TiUITableViewRow], e.source = [object TiUITableViewRow]\n\nSecond or any other row is clicked: \n[INFO] e.row =[object TiUITableViewRow], e.source = [object TiUILabel]", "updateAuthor": { "name": "muralinr", "key": "muralinr", "displayName": "Murali Rama", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-07T05:27:16.000+0000", "updated": "2014-01-07T05:27:16.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }