Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-515] table view with text field (render problem + crash)

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:53:21.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.1.0
ComponentsiOS
Labelsn/a
ReporterNolan Wright
AssigneeBlain Hamon
Created2011-04-15T02:30:44.000+0000
Updated2011-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();

Comments

  1. Jeff Haynie 2011-04-15

    (from [2e2ca117dd9e0431d28705567b25eedd01ad34f2]) Closes #515 http://github.com/appcelerator/titanium_mobile/commit/2e2ca117dd9e0431d28705567b25eedd01ad34f2"> http://github.com/appcelerator/titanium_mobile/commit/2e2ca117dd9e0...

JSON Source