{ "id": "116891", "key": "TIMOB-14529", "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-07-04T08:36:07.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "focus", "textfield" ], "versions": [ { "id": "15478", "description": "Release 3.1.1", "name": "Release 3.1.1", "archived": true, "released": true, "releaseDate": "2013-06-17" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [ { "id": "30100", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "116892", "key": "AC-2059", "fields": { "summary": "TextField focus doesn't work when TF isn't visible...", "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" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": null, "updated": "2018-02-28T20:04:04.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [], "description": "*Problem*\r\nTextField focus doesn't work when TextField isn't visible on a screen.\r\n\r\n*Steps to reproduce*\r\n1. Launch app\r\n2. When you stay on the top of a TableView you can see first TextField there focus work without any problem\r\n3. Try to hide shown keyboard for first TextField and scroll/move to the bottom of a TableView (There the focus doesn't work)\r\n\r\n*Test case*\r\n{code:javascript} \r\nvar win = Ti.UI.createWindow();\r\nvar table = Ti.UI.createTableView({\r\n\tstyle : Ti.UI.iPhone.TableViewStyle.GROUPED\r\n});\r\nvar data = [];\r\n\r\nfor (var i = 0; i < 20; i++) {\r\n\tvar row = Ti.UI.createTableViewRow({\r\n\t\twidth : Ti.UI.FILL,\r\n\t\theight : Ti.UI.FILL\r\n\t});\r\n\tvar tField = Ti.UI.createTextField({\r\n\t\twidth : Ti.UI.FILL,\r\n\t\theight : \"100%\"\r\n\t});\r\n\r\n\trow.add(tField);\r\n\tdata.push(row);\r\n}\r\n\r\ntable.data = data;\r\n\r\nwin.add(table);\r\nwin.open();\r\n\r\nsetInterval(function() {\r\n\tdata[0].children[0].focus();\r\n}, 3000);\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: TextField focus doesn't work when TextField isn't visible", "creator": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Macbook Pro, OSX 10.7.5, iOS Simulator v. 6.0 (369.2). Ti: 3.1 GA", "comment": { "comments": [ { "id": "260936", "author": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Sorry for double issue", "updateAuthor": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-07T22:02:38.000+0000", "updated": "2013-07-07T22:02:38.000+0000" }, { "id": "261105", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Sorry I don't understand. How can you focus a TextField which is out of view?", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-09T18:38:21.000+0000", "updated": "2013-07-09T18:38:21.000+0000" }, { "id": "261111", "author": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I don't understand \"out of view\". In sample above I want to focus TextField which is in the first row of a TableView. Or another example. \n\nUser filled table with 10-20 rows/TextFields and now he is in the bottom of a TableView - on a last row. He pressed SAVE button ,but first/second... TextField is filled wrong ,so I want to set focus for this TextField ,but unfortunately I can't...", "updateAuthor": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-09T19:10:52.000+0000", "updated": "2013-07-09T19:10:52.000+0000" }, { "id": "261119", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "By out of view I mean how can you focus a TextField which you can't see. However, are you referring to the auto scrolling by any chance?\n\nWhere if you're focussed on the bottom TextField and try to scroll up it scrolls back down.\n\nIt's still possible to enter focus into a top TextField however, you just need to be fast.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-09T19:41:02.000+0000", "updated": "2013-07-09T19:41:02.000+0000" }, { "id": "261417", "author": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "body": "But why I can't focus a TextField which I can't see? That isn't normal behavior or? Basically if is user on the bottom of a TableView and last TextField has focus / doesn't has focus (It is doesn't matter) I can't set focus for first TextField (For example, it may be second, third TextField...). After set focus for first TextField I want to move/scroll TableView to this TextField ,so user can see TextField where he has to put/change data ,but unfortunately I can't...", "updateAuthor": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-11T10:12:57.000+0000", "updated": "2013-07-11T10:13:26.000+0000" }, { "id": "261486", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "My apologies, I totally looked over the fact that it had an interval programatically setting the focus :/\n\nTested and confirmed on iOS 6 simulator with Ti SDK 3.1.1 GA and latest 3.2 CI.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-11T19:33:47.000+0000", "updated": "2013-07-11T19:33:47.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }