{ "id": "150724", "key": "AC-323", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-11-12T11:45:53.000+0000", "created": "2015-08-26T12:32:39.000+0000", "labels": [ "focus", "tableViewRow", "textfield" ], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-11T15:52:17.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": "14551", "name": "Studio", "description": "Please enter tickets related to Titanium Studio here." } ], "description": "When a textfield has no height property (or property is set as Ti.UI.SIZE) and is placed on a tableViewRow, it loses focus as soon as you start typing, the first character entered is displayed, but after that the field loses focus (without the blur event beeing fired) and no more characters can be entered without focusing the textfield again. This happens both on iOS Simulator (8.4) and on actual device. See example code below.\r\n\r\nI have tested this with Ti SDK 4.0.0.GA, 4.1.0 GA and 4.2.0.v20150812202823 (textfield loses focus after first char entered), and on Ti SDK 3.5.1.GA it works as expected (no problem). \r\n\r\nTemporary fix/workaround: Always set height of textfields (which can be troublesome on multiple platforms and on textfields with different font sizes). \r\n\r\n{code:JavaScript|borderStyle:dashed}\r\nvar tabGroup = Ti.UI.createTabGroup();\r\n\r\n//create app tabs\r\nvar win1 = Ti.UI.createWindow({\r\n\ttitle: 'Win1',\r\n\tbackgroundColor: 'white'\r\n});\r\n\r\nvar win2 = Ti.UI.createWindow({\r\n\ttitle: 'Win2',\r\n\tbackgroundColor: 'white'\r\n});\r\n\r\nvar tab1 = Ti.UI.createTab({\r\n\ttitle: win1.title,\r\n\twindow: win1\r\n});\r\n\r\nvar tab2 = Ti.UI.createTab({\r\n\ttitle: win2.title,\r\n\twindow: win2\r\n});\r\n\r\ntabGroup.addTab(tab1);\r\ntabGroup.addTab(tab2);\r\n\r\nvar theTableView = Ti.UI.createTableView({\r\n\ttop: 0,\r\n\tbottom: 0,\r\n\tleft: 0,\r\n\tright: 0,\r\n});\r\nwin1.add(theTableView);\r\n\r\nvar data = [];\r\nvar row = Ti.UI.createTableViewRow({\r\n\theight: 64\r\n});\r\n\r\nvar txtF = Ti.UI.createTextField({\r\n\tleft: 15,\r\n\tright: 15,\r\n\t//XXX uncomment the \"height\"-line, and the text field works as expected\r\n\t//XXX comment the \"height\"-line and the text field loses focus on value beeing entered into text field\r\n\t//height: 40,\r\n\thintText: 'theHintText',\r\n\tkeyboardType: Ti.UI.KEYBOARD_DEFAULT,\r\n\treturnKeyType: Ti.UI.RETURNKEY_NEXT,\r\n\tborderStyle: Ti.UI.INPUT_BORDERSTYLE_ROUNDED\r\n});\r\nrow.add(txtF);\r\n\r\ntxtF.addEventListener('blur', function(e) {\r\n\talert('blur!');\r\n});\r\ntxtF.addEventListener('focus', function(e) {\r\n\tTi.API.info('focus!');\r\n});\r\n\r\ndata.push(row);\r\n\r\ntheTableView.setData(data);\r\n\r\ntabGroup.open();\r\n\r\n{code}", "attachment": [], "flagged": false, "summary": "textField on tableViewRow loses focus on entering value", "creator": { "name": "woodoo", "key": "woodoo", "displayName": "Michael Woode", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "woodoo", "key": "woodoo", "displayName": "Michael Woode", "active": true, "timeZone": "Europe/Berlin" }, "environment": "*Operating System*\r\n Name = Mac OS X\r\n Version = 10.10.4\r\n Architecture = 64bit\r\n\r\n*Node.js*\r\n Node.js Version = 0.12.7\r\n npm Version = 2.11.3\r\n\r\n*Appcelerator CLI*\r\n Installer = 4.1.0\r\n Core Package = 4.1.2\r\n\r\n*Titanium CLI*\r\n CLI Version = 4.0.1\r\n node-appc Version = 0.2.26\r\n\r\n*Titanium SDK*\r\n4.1.0.GA", "comment": { "comments": [ { "id": "370082", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, The issue is resolved in latest SDK 5.0.2.GA. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2015-11-12T11:45:53.000+0000", "updated": "2015-11-12T11:45:53.000+0000" }, { "id": "379539", "author": { "name": "Andrea.Vitale", "key": "andrea.vitale", "displayName": "Andrea Vitale", "active": true, "timeZone": "Europe/Berlin" }, "body": "This error is present with Ti SDK 5.2.0.GA. I haven't set the height property and the TextField lose its focus after the first insertion. I set the height property to Ti.UI.FILL and now its working.", "updateAuthor": { "name": "Andrea.Vitale", "key": "andrea.vitale", "displayName": "Andrea Vitale", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-03-11T15:52:17.000+0000", "updated": "2016-03-11T15:52:17.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }