{ "id": "167208", "key": "ALOY-1562", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2017-05-09T17:53:49.000+0000", "created": "2017-04-20T12:02:33.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "updated": "2017-05-09T17:53:49.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": "12332", "name": "Titanium SDK", "description": "Any integration or issues with the TiSDK" } ], "description": "h6.Reproduce\r\n1. Run the attached files in a new Alloy project.\r\n2. Click the first row of tableview\r\n\r\nh6.Problem\r\nThe textArea does not get focus and keyboard does not show up\r\n\r\nh6.Note\r\nIf there is only one tableViewSection with those two tableViewRows (instead of one row in each section), TextArea will get focused and keyboard will display well. ", "attachment": [ { "id": "62110", "filename": "AlloyFiles.zip", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-04-26T10:48:16.000+0000", "size": 2992, "mimeType": "application/zip" }, { "id": "62069", "filename": "index.js", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2017-04-20T12:02:20.000+0000", "size": 261, "mimeType": "text/javascript" }, { "id": "62066", "filename": "index.tss", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2017-04-20T12:02:21.000+0000", "size": 432, "mimeType": "application/octet-stream" }, { "id": "62064", "filename": "index.xml", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2017-04-20T12:02:21.000+0000", "size": 173, "mimeType": "text/xml" }, { "id": "62158", "filename": "multipleSectionTesting1.zip", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2017-05-04T13:32:56.000+0000", "size": 7538, "mimeType": "application/zip" }, { "id": "62068", "filename": "tableRow.js", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2017-04-20T12:02:20.000+0000", "size": 199, "mimeType": "text/javascript" }, { "id": "62067", "filename": "tableRow.tss", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2017-04-20T12:02:20.000+0000", "size": 1818, "mimeType": "application/octet-stream" }, { "id": "62065", "filename": "tableRow.xml", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2017-04-20T12:02:21.000+0000", "size": 1045, "mimeType": "text/xml" } ], "flagged": false, "summary": "iOS: TextArea can't get focus or blur if it is located in two different TableViewSections", "creator": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "subtasks": [], "reporter": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "environment": "iOS 10\r\nSDK 6.0.3", "closedSprints": [ { "id": 890, "state": "closed", "name": "2017 Sprint 10 Tooling", "startDate": "2017-05-08T00:27:34.394Z", "endDate": "2017-05-22T00:27:00.000Z", "completeDate": "2017-05-22T02:42:47.719Z", "originBoardId": 199 } ], "comment": { "comments": [ { "id": "417996", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I tried with following classic app test code -\r\n\r\n{code:java}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\n\r\nvar label = Ti.UI.createLabel({\r\n text: 'test focus'\r\n});\r\nvar textArea = Ti.UI.createTextArea({\r\n value:'test test test',\r\n height:80,\r\n backgroundColor:'gray',\r\n width:Ti.UI.FILL\r\n});\r\n\r\nvar row1 = Ti.UI.createTableViewRow({\r\n height: 100\r\n\r\n});\r\nrow1.add(label);\r\n\r\nvar row2 = Ti.UI.createTableViewRow({\r\n height: 100\r\n});\r\nrow2.add(textArea);\r\n\r\nvar section1 = Ti.UI.createTableViewSection({\r\n\r\n});\r\nsection1.add(row1);\r\n//section1.add(row2);\r\n\r\nvar section2 = Ti.UI.createTableViewSection({\r\n\r\n});\r\nsection2.add(row2);\r\n\r\nvar table = Ti.UI.createTableView({\r\n data: [section1, section2]\r\n});\r\n\r\nrow1.addEventListener('click', function(e) {\r\nhidekeyboard();\r\n});\r\nfunction hidekeyboard(){\r\n Ti.API.info(\"hide keyboard\");\r\n Ti.API.info(textArea.value);\r\n textArea.focus(); \r\n}\r\n\r\nwin.add(table);\r\nwin.open();\r\n{code}\r\n\r\nIt is working fine . But when I am trying with given alloy code, it is giving wrong behavior as mentioned in ticket.\r\n[~htbryant] Can you please help me in reproducing with help of simple test case . It will help me in debugging more efficiently.", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-04-25T09:37:56.000+0000", "updated": "2017-04-25T09:40:33.000+0000" }, { "id": "418039", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "[~vijaysingh] Sure, I'll investigate the issue and post my findings here. ", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2017-04-25T19:16:19.000+0000", "updated": "2017-04-25T19:16:19.000+0000" }, { "id": "418088", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~sliang] The workaround which worked for me is, in xml file TableView tag should be withTableViewSection. So I have attached \"AlloyFiles.zip\" which have updated index.xml, tableRow.xml, index.js . Please check with customer if this will resolve their problem.", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-04-26T10:56:32.000+0000", "updated": "2017-04-26T10:56:32.000+0000" }, { "id": "418221", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "[~vijaysingh], could you try replace the loadData function under index.js with these:\r\n\r\n{code}\r\nfunction loadData(){\r\n\tvar formrow = [];\r\n\r\n\tvar tbl = Alloy.createController('tableRow');\r\n\tformrow.push(tbl.getView('timeDataSection'));\r\n\tformrow.push(tbl.getView('commentsSection'));\r\n\r\n\t$.formDetails.setData(formrow);\r\n}\r\n{code}", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2017-04-28T00:05:17.000+0000", "updated": "2017-04-28T00:05:17.000+0000" }, { "id": "418599", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "[~sliang], do these work for the customer?\r\n{code}\r\nvar tbl = Alloy.createController('tableRow', [arg1, arg2]);\r\n// or \r\nvar tbl = Alloy.createController('tableRow', {a: arg1, b: arg2});\r\n{code}", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2017-05-02T17:00:34.000+0000", "updated": "2017-05-02T17:00:49.000+0000" }, { "id": "419090", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "body": "[~fmiao]\r\n\r\nJust get customer's feedback.\r\n\r\n\"Yes it working fine in sample application. But in our case it is not working. Since we are sending dynamic arguments to each section in loop. \r\n\r\nExample :\r\n\r\nformrow.push(Alloy.createController('tableRow', {a: arg1, b: arg2}).getView('commentsSection'))\r\n\r\nAttached the multipleSectionTesting1.zip file which has sample application. I have hard coded the arguments values but in our case it comes from database. Also i have small icon in first labour time row, if i click that new section of labour and travel row will append using insertSectionAfter API . That functionality i didn't mentioned in sample. Basically we are passing arguments dynamically to tableRow file. So we cannot set the arguments like shown below. \r\n\r\nvar tbl = Alloy.createController('tableRow', [arg1, arg2]);\r\n\r\nIf i click the Travel Time row, the comments field is not focusing. The focus and blur API is not working if we have TextArea in separate section. \"", "updateAuthor": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2017-05-04T13:15:27.000+0000", "updated": "2017-05-04T13:15:27.000+0000" }, { "id": "419123", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "[~sliang]\r\nThe issue here is not that the focus or blur API is not working when a view is in different section.\r\n\r\nEach {{Alloy.createController('tableRow')}} call creates an instance of the controller {{tableRow}}, and the {{loadData}} event triggered by the instance will access the view {{$.REPAIR_COMMENT}} within that instance. \r\n\r\nTo access controller object B's view in object A, pass a reference of the view in B to A.", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2017-05-04T18:38:46.000+0000", "updated": "2017-05-04T18:40:05.000+0000" } ], "maxResults": 14, "total": 14, "startAt": 0 } } }