{ "id": "63721", "key": "TIMOB-3089", "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": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2012-08-30T16:51:58.000+0000", "created": "2011-04-15T03:36:36.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [ "defect", "ios", "reported-1.6.0", "rplist", "tbs-1.9.0" ], "versions": [ { "id": "11243", "name": "Release 1.6.0 M10", "archived": true, "released": true, "releaseDate": "2011-02-21" } ], "issuelinks": [ { "id": "20474", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "94532", "key": "TIMOB-9901", "fields": { "summary": "TiAPI: Review and clean up platform bugs and reduce bug count by 20%.", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-23T21:12:34.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 could be a defect or just an issue of what is best\r\npractice.

\r\n

If you set a focus() on the SearchBar before the window is\r\nopened it doesn't get fully rendered (see customer's example)\r\nor will draw it on the canvas realtime (See video link\r\nbelow). The workaround is simple: place the focus() after the\r\nwindow is opened or delay the focus event a few ms.

\r\n

Sample Code: http://pastie.org/1545123
\r\nVideo: \r\nhttp://www.screencast.com/users/XiDScreencasts/folders/Jing/media/4...
\r\nHD Ticket (Customer's sample code there): http://developer.appcelerator.com/helpdesk/view/66091#c340591

{html}", "attachment": [], "flagged": false, "summary": "iPhone: SearchBar UI Doesn't get fully rendered when focus() is added before the window is opened", "creator": { "name": "rblalock", "key": "rblalock", "displayName": "Rick Blalock", "active": false, "timeZone": "America/Havana" }, "subtasks": [], "reporter": { "name": "rblalock", "key": "rblalock", "displayName": "Rick Blalock", "active": false, "timeZone": "America/Havana" }, "environment": null, "comment": { "comments": [ { "id": "162059", "author": { "name": "jamesdlow", "key": "jamesdlow", "displayName": "James David Low", "active": true, "timeZone": "Europe/London" }, "body": "I'm having a similar problem when the table view is added before the window is opened. Code showing the bug:\r\n\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\nvar win1 = Titanium.UI.createWindow({title:'Tab 1',backgroundColor:'#fff'});\r\nvar tab1 = Titanium.UI.createTab({title:'Tab 1',window:win1});\r\n\r\nfunction createTableView() {\r\n\tvar search = Titanium.UI.createSearchBar();\r\n\tvar tableview = Titanium.UI.createTableView({\r\n\t\tdata:[{title:'New Table View'}],\r\n\t\tsearch:search,\r\n\t\tfilterAttribute:'title'\r\n\t});\r\n\ttableview.addEventListener('click',function(e) {createTableView();});\r\n\twin1.add(tableview);\r\n}\r\ncreateTableView();\r\ntabGroup.addTab(tab1);\r\ntabGroup.open();", "updateAuthor": { "name": "jamesdlow", "key": "jamesdlow", "displayName": "James David Low", "active": true, "timeZone": "Europe/London" }, "created": "2011-08-05T16:04:07.000+0000", "updated": "2011-08-05T16:04:07.000+0000" }, { "id": "195103", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Jira bug review - reproducing same video behavior with 2.0 GA and 2.1 CI SDK", "updateAuthor": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-16T16:16:33.000+0000", "updated": "2012-05-16T16:16:33.000+0000" }, { "id": "217094", "author": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "body": "Tested on the iOS Simulator using TiSDK 2.2.0v20120830102513, unable to reproduce the issue. Everything seems to be fine and fully loaded. \r\n\r\nTicket marked as resolved. \r\n\r\n{code}\r\nvar win = Titanium.UI.createWindow({backgroundColor: 'white'});\r\n\r\n\r\nvar searchBar = Ti.UI.createSearchBar({\r\n barColor: '#00f',\r\n showCancel: false,\r\n hintText: 'Search for Something'\r\n});\r\nvar searchHasFocus = false;\r\n\r\nvar tableView = Ti.UI.createTableView({\r\n backgroundColor: 'white',\r\n search: searchBar\r\n});\r\n\r\nsearchBar.addEventListener('focus', function(e) {\r\n searchHasFocus = true;\r\n e.source.showCancel = true;\r\n});\r\n\r\nsearchBar.addEventListener('blur', function(e) {\r\n searchHasFocus = false;\r\n e.source.showCancel = false;\r\n});\r\n\r\nsearchBar.addEventListener('return', function(e) {\r\n if (searchHasFocus) searchBar.blur();\r\n});\r\n\r\nsearchBar.addEventListener('cancel', function(e) {\r\n searchBar.blur();\r\n});\r\n\r\ntableView.addEventListener('touchstart', function(e) {\r\n if (searchHasFocus) searchBar.blur();\r\n});\r\n\r\ntableView.addEventListener('scroll', function(e) {\r\n if (searchHasFocus) searchBar.blur();\r\n});\r\n\r\nwin.add(tableView);\r\n\r\nsearchBar.focus();\r\n\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "created": "2012-08-30T16:51:58.000+0000", "updated": "2012-08-30T16:53:15.000+0000" }, { "id": "415376", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Can verify this ticket as \"Cannot Reproduce\". Tested with the following environment;\r\niPhone 7 and Simulator (10.2)\r\nMacOS 10.11.6 (15G31)\r\nStudio 4.8.1.201612050850\r\nTi SDK 6.0.3 GA\r\nAppc NPM 4.2.8\r\nAppc CLI 6.1.0\r\nTi CLI 5.0.11\r\nAlloy 1.9.5\r\nArrow 1.10.1\r\nXcode 8.2 (8C38)\r\nNode v4.6.0\r\nJava 1.7.0_80", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-23T21:12:34.000+0000", "updated": "2017-03-23T21:12:34.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }