[TIMOB-515] table view with text field (render problem + crash)
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:53:21.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.1.0 |
Components | iOS |
Labels | n/a |
Reporter | Nolan Wright |
Assignee | Blain Hamon |
Created | 2011-04-15T02:30:44.000+0000 |
Updated | 2011-04-17T01:53:21.000+0000 |
Description
problem 1: focus text field and click return key on keyboard. table view row drops to the bottom
problem 2: focus text field and click close button = crash
ticket: http://helpdesk.appcelerator.net/tickets/1420">http://helpdesk.appcelerator.net/tickets/1420
code:
var tgMain = Titanium.UI.createTabGroup();
var winMain = Titanium.UI.createWindow({title:'My App',
tabBarHidden:true});
var tabMain = Titanium.UI.createTab({title:'',
window:winMain});
tgMain.addTab(tabMain);
var btnOpen = Titanium.UI.createButton({
title:'Open window',
width:200,
height:40,
top:10
});
btnOpen.addEventListener('click', function() {
var win = Titanium.UI.createWindow({title:'My Window'});
var btnClose = Titanium.UI.createButton({title:'Close',
style:Titanium.UI.iPhone.SystemButtonStyle.DONE});
win.setRightNavButton(btnClose);
btnClose.addEventListener('click', function(evt) {
win.close();
});
var row = Ti.UI.createTableViewRow();
var tf = Titanium.UI.createTextField({
keyboardType:Titanium.UI.KEYBOARD_DEFAULT,
autocorrect:false,
hintText:'John Doe',
height:29,
width:250,
clearButtonMode:Titanium.UI.INPUT_BUTTONMODE_ONFOCUS,
borderStyle:Titanium.UI.INPUT_BORDERSTYLE_LINE
}); row.add(tf);
var data = [];
data[0] = Ti.UI.createTableViewSection();
data[0].add(row);
var tv = Titanium.UI.createTableView({
style: Titanium.UI.iPhone.TableViewStyle.GROUPED,
data:data,
rowHeight:44
}); win.add(tv);
tabMain.open(win, {animated:true});
});
winMain.add(btnOpen);
tgMain.open();
(from [2e2ca117dd9e0431d28705567b25eedd01ad34f2]) Closes #515 http://github.com/appcelerator/titanium_mobile/commit/2e2ca117dd9e0431d28705567b25eedd01ad34f2"> http://github.com/appcelerator/titanium_mobile/commit/2e2ca117dd9e0...