{ "id": "91592", "key": "TIMOB-9056", "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": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13402", "description": "Sprint 2012-10 Core", "name": "Sprint 2012-10 Core", "archived": true, "released": true, "releaseDate": "2012-05-20" } ], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2012-05-12T16:24:35.000+0000", "created": "2012-05-08T11:23:02.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "core" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [], "assignee": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-22T17:21:26.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h4. Problem Description\r\nCustomer has been putting a bunch of textfields in rows inside a table. This is working nice in general, except when the device has an external keyboard (slider models, like HTC PG06100). We are looking for a possible fix in the platform or workaround in order to get the focus properly in each textfield.\r\n\r\nh4. Actual results\r\nThe textfield is not getting the focus in the bottom of the tableview.\r\n\r\nh4. Expected results \r\nAll textfields getting focus across all the textfields.\r\n\r\nh4. Test Case\r\n1. Create a mobile project\r\n2. Paste this code:\r\n{code}\r\nvar win = Ti.UI.createWindow();\r\nvar datasource = [];\r\nwin.orientationModes = [Titanium.UI.PORTRAIT, Titanium.UI.UPSIDE_PORTRAIT, Titanium.UI.LANDSCAPE_LEFT, Titanium.UI.LANDSCAPE_RIGHT];\r\nwin.windowSoftInputMode = (Ti.UI.Android) ? Ti.UI.Android.SOFT_INPUT_ADJUST_PAN : '';\r\nfunction createRows(i) {\r\n\tvar row = Titanium.UI.createTableViewRow({\r\n\t\theight : 'auto',\r\n\t\tbackgroundColor : 'white',\r\n\t\tbottom:10,\r\n\t});\r\n\tvar textLabel = Titanium.UI.createLabel({\r\n\t\ttop : 10,\r\n\t\tbottom : 10,\r\n\t\tleft : '5%',\r\n\t\tright : '30%',\r\n\t\theight : 'auto',\r\n\t\tcolor : '#363636',\r\n\t\ttext : 'This is Row ' + (i + 1),\r\n\t\tfont : {\r\n\t\t\tfontSize : 14,\r\n\t\t\tfontFamily : 'Helvetica Neue',\r\n\t\t\tfontWeight : 'regular'\r\n\t\t}\r\n\r\n\t});\r\n\r\n\trow.add(textLabel);\r\n\tvar txtField = Titanium.UI.createTextField({\r\n\t\tright : '3.1%',\r\n\t\tleft : '55%',\r\n\t\tborderStyle : Ti.UI.INPUT_BORDERSTYLE_ROUNDED,\r\n\t\theight : 44,\r\n\t\ttop : 10,\r\n\t\tbottom : 10,\r\n\t\tborderRadius : 5,\r\n\t\tfont : {\r\n\t\t\tfontSize : 17,\r\n\t\t\tfontFamily : 'Helvetica Neue'\r\n\t\t},\r\n\t\treturnKeyType : Titanium.UI.RETURNKEY_DONE\r\n\t});\r\n\ttxtField.softKeyboardOnFocus = (Ti.UI.Android) ? Titanium.UI.Android.SOFT_KEYBOARD_SHOW_ON_FOCUS : '';\t\r\n\ttxtField.addEventListener('focus', function(e) {\r\n\t\tvar alertDialog = Titanium.UI.createAlertDialog({\r\n\t\t\ttitle : 'AttentioN',\r\n\t\t\tmessage : 'Focus Event on Text Field',\r\n\t\t\tbuttonNames : ['OK']\r\n\t\t});\r\n\t\talertDialog.show();\r\n\t});\r\n\ttxtField.addEventListener('return', function(e) {\r\n\t\t//txtField.blur();\r\n\t});\r\n\trow.add(txtField);\r\n\treturn row;\r\n}\r\n\r\nfor( i = 0; i <= 15; i++) {\r\n\tvar row = createRows(i);\r\n\tdatasource.push(row);\r\n}\r\n\r\nvar tableView = Titanium.UI.createTableView({\r\n\ttop : 0,\r\n\tbottom : 0,\r\n\tseparatorColor : '#e7e7e7',\r\n\tdata : datasource,\r\n\tbackgroundColor : '#ffffff'\r\n});\r\n\r\nwin.add(tableView);\r\nwin.open();\r\n{code}\r\n\r\nh4. Extra info\r\nNeeds to be reproduced with a slider phone", "attachment": [], "flagged": false, "summary": "Android: Textfields in a TableViewRow are losing focus in sliding android phones (physical keyboard)", "creator": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "subtasks": [], "reporter": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "environment": "Titanium SDK version: 2.1.0v20120504\r\nJavascript Engine: V8 \r\nPlatform & version: Android 2.3 \r\nDevice Details: Android emulator\r\nHost Operating System: OS X 10.7.3\r\nTitanium Studio version: 2.0", "comment": { "comments": [ { "id": "194617", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "After some investigation, it looks like it's some odd behavior with the native android list view and hardware keyboards. The current position in the list view does not get resolved correctly when using hardware keyboard, and as a result, the list view is forced to the very top. When the list view scrolls to the top, we lose focus of the text field, and can't regain the focus on it. \r\n\r\nThis is odd android behavior, and can't be fixed on our platform. In general, I would try to avoid using textfields inside table views since it is not well supported on the android platform.", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-12T16:24:23.000+0000", "updated": "2012-05-12T16:24:23.000+0000" }, { "id": "414783", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue will not fix and with reference to the above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T17:21:26.000+0000", "updated": "2017-03-22T17:21:26.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }