{ "id": "63528", "key": "TIMOB-2896", "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": "11366", "description": "", "name": "Sprint 2011-34", "archived": true, "released": true, "releaseDate": "2011-08-29" }, { "id": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-11-05T14:41:37.000+0000", "created": "2011-04-15T03:32:21.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [], "versions": [ { "id": "11233", "name": "Release 1.6.0", "archived": true, "released": true, "releaseDate": "2011-02-23" } ], "issuelinks": [], "assignee": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-11-05T14:41:37.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

This is a simple example of two textFields, one on the toolbar\r\nand another one on the window itself.
\r\nTwo buttons that will make them blur, but not working.
\r\nExample:
\r\nhttp://pastie.org/1479732

\r\n

Bug found while to debugging HD ticket: http://developer.appcelerator.com/helpdesk/view/66241

\r\n

Tested on iPhone and iPad simulator running iOS 4.2 and Ti. SDK\r\n1.4.3, 1.5.1, 1.5.2, and 1.6.0

{html}", "attachment": [], "flagged": false, "summary": "iOS: Calling textField.blur() not working", "creator": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "163406", "author": { "name": "framirez", "key": "framirez", "displayName": "Francisco Antonio Duran Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "body": "h3. Problem:\r\nKeyboard does not disappear when the customer use the textfield.blur() \r\n\r\nh3. Reproducible steps:\r\nRun the code below.\r\n\r\nh3. Expected Behavior:\r\n\r\nDisappear the keyboard when user use textfield.blur()\r\n\r\nh3. Sample Code:\r\n{code}\r\nvar win = Titanium.UI.createWindow();\r\n\r\nwin.orientationModes = [\r\n\tTitanium.UI.PORTRAIT,\r\n\tTitanium.UI.UPSIDE_PORTRAIT,\r\n\tTitanium.UI.LANDSCAPE_LEFT,\r\n\tTitanium.UI.LANDSCAPE_RIGHT\r\n]; \r\n\r\nvar flexSpace = Titanium.UI.createButton({\r\n\tsystemButton:Titanium.UI.iPhone.SystemButton.FLEXIBLE_SPACE\r\n});\r\n\r\nvar tf = Titanium.UI.createTextField({\r\n\theight:32,\r\n\t//backgroundImage:'../images/inputfield.png',\r\n\tbackgroundColor:'white',\r\n\twidth:200,\r\n\tfont:{fontSize:13},\r\n\tcolor:'#777',\r\n\tpaddingLeft:10,\r\n\tborderStyle:Titanium.UI.INPUT_BORDERSTYLE_NONE\r\n});\r\n\r\nvar camera = Titanium.UI.createButton({\r\n\tbackgroundImage:'../images/camera.png',\r\n\theight:33,\r\n\twidth:33\r\n});\r\ncamera.addEventListener('click', function()\r\n{\r\n\tTitanium.UI.createAlertDialog({title:'Toolbar',message:'You clicked camera!'}).show();\r\n});\r\n\r\nvar send = Titanium.UI.createButton({\r\n\tbackgroundImage:'../images/send.png',\r\n\tbackgroundColor:'orange',\r\n\ttitle:'Send',\r\n\tbackgroundSelectedImage:'../images/send_selected.png',\r\n\twidth:67,\r\n\theight:32\r\n});\r\nsend.addEventListener('click', function()\r\n{\r\n\ttf.blur();\r\n\tTitanium.UI.createAlertDialog({title:'Toolbar',message:'You clicked send!'}).show();\r\n});\r\n\r\n\r\nvar textfield = Titanium.UI.createTextField({\r\n\tcolor:'#336699',\r\n\tvalue:'Focus to see keyboard w/ toolbar',\r\n\theight:35,\r\n\twidth:300,\r\n\ttop:10,\r\n\tborderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED,\r\n\tkeyboardToolbar:[flexSpace,camera, flexSpace,tf,flexSpace, send,flexSpace],\r\n\tkeyboardToolbarColor: '#999',\t\r\n\tkeyboardToolbarHeight: 40\r\n});\r\n\r\nvar textfield2 = Titanium.UI.createTextField({\r\n\tcolor:'#336699',\r\n\tvalue:'Focus to see keyboard w/o toolbar',\r\n\theight:35,\r\n\twidth:300,\r\n\ttop:70,\r\n\tborderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED\r\n});\r\n\r\n\r\n\r\nwin.add(textfield);\r\nwin.add(textfield2);\r\nwin.open();\r\n\r\n{code}\r\n\r\nh3. Helpdesk APP-814256 ", "updateAuthor": { "name": "framirez", "key": "framirez", "displayName": "Francisco Antonio Duran Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-19T08:50:38.000+0000", "updated": "2011-08-19T08:50:38.000+0000" }, { "id": "163652", "author": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Call windowWillOpen, windowDidOpen when adding proxies to the toolbar.\r\n\r\nPull request pending.", "updateAuthor": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-22T13:20:10.000+0000", "updated": "2011-08-22T13:20:10.000+0000" }, { "id": "163653", "author": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Note that the sample script has an error with regard to the second event handler blurring the wrong text field (textField1) and should be blurring textField2.", "updateAuthor": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-22T13:21:08.000+0000", "updated": "2011-08-22T13:21:08.000+0000" }, { "id": "164061", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Replace the sample script:\r\ntf.blur(); \r\nwith\r\ntextfield.blur();", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-25T14:25:33.000+0000", "updated": "2011-08-25T14:25:33.000+0000" }, { "id": "164188", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested, reviewed, merged, signed, sealed, delivered.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-26T14:17:28.000+0000", "updated": "2011-08-26T14:17:28.000+0000" }, { "id": "165322", "author": { "name": "avaghti", "key": "avaghti", "displayName": "Alan Vaghti", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Passed as expected on iPhone 4 running 4.2.10 and iPad 2 running 4.3.2.", "updateAuthor": { "name": "avaghti", "key": "avaghti", "displayName": "Alan Vaghti", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-09-07T16:19:39.000+0000", "updated": "2011-09-07T16:19:39.000+0000" }, { "id": "171649", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Standardizing summary and labels.", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-05T14:41:04.000+0000", "updated": "2011-11-05T14:41:04.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }