[TIMOB-3089] iPhone: SearchBar UI Doesn't get fully rendered when focus() is added before the window is opened
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Trivial |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2012-08-30T16:51:58.000+0000 |
Affected Version/s | Release 1.6.0 M10 |
Fix Version/s | n/a |
Components | iOS |
Labels | defect, ios, reported-1.6.0, rplist, tbs-1.9.0 |
Reporter | Rick Blalock |
Assignee | Neeraj Gupta |
Created | 2011-04-15T03:36:36.000+0000 |
Updated | 2017-03-23T21:12:34.000+0000 |
Description
This could be a defect or just an issue of what is best practice.
If you set a focus() on the SearchBar before the window is opened it doesn't get fully rendered (see customer's example) or will draw it on the canvas realtime (See video link below). The workaround is simple: place the focus() after the window is opened or delay the focus event a few ms.
Sample Code: http://pastie.org/1545123">http://pastie.org/1545123
Video: http://www.screencast.com/users/XiDScreencasts/folders/Jing/media/4a51feee-e70e-4cd0-bfcd-b751661d3943">
http://www.screencast.com/users/XiDScreencasts/folders/Jing/media/4...
HD Ticket (Customer's sample code there): http://developer.appcelerator.com/helpdesk/view/66091#c340591">http://developer.appcelerator.com/helpdesk/view/66091#c340591
I'm having a similar problem when the table view is added before the window is opened. Code showing the bug: var tabGroup = Titanium.UI.createTabGroup(); var win1 = Titanium.UI.createWindow({title:'Tab 1',backgroundColor:'#fff'}); var tab1 = Titanium.UI.createTab({title:'Tab 1',window:win1}); function createTableView() { var search = Titanium.UI.createSearchBar(); var tableview = Titanium.UI.createTableView({ data:[{title:'New Table View'}], search:search, filterAttribute:'title' }); tableview.addEventListener('click',function(e) {createTableView();}); win1.add(tableview); } createTableView(); tabGroup.addTab(tab1); tabGroup.open();
Jira bug review - reproducing same video behavior with 2.0 GA and 2.1 CI SDK
Tested on the iOS Simulator using TiSDK 2.2.0v20120830102513, unable to reproduce the issue. Everything seems to be fine and fully loaded. Ticket marked as resolved.
Can verify this ticket as "Cannot Reproduce". Tested with the following environment; iPhone 7 and Simulator (10.2) MacOS 10.11.6 (15G31) Studio 4.8.1.201612050850 Ti SDK 6.0.3 GA Appc NPM 4.2.8 Appc CLI 6.1.0 Ti CLI 5.0.11 Alloy 1.9.5 Arrow 1.10.1 Xcode 8.2 (8C38) Node v4.6.0 Java 1.7.0_80