TableViewSection and TextField Blur Events not working

You must Login before you can answer or comment on any questions.

I am trying to create a settings panel and I am using GROUPED styled table with sections. The blur event on a textField (in a tableRow) does not fire when in a Table Section.

var dataTest=[];
    for (var i = 10 - 1; i >= 0; i--) {
        var row = Titanium.UI.createTableViewRow({
            height: 55,
            layout: 'horizontal'
        });
 
 
        var lblTest = Titanium.UI.createLabel({
            text:'Text Field',
            font:{fontSize:16,fontWeight:'bold'},
            width:Ti.UI.SIZE,
            textAlign:'left',
            top:10,
            left:10,
            height:16
        });
 
        var txtTest =  Titanium.UI.createTextField({
            custom: i,
            color:'#336699',
            font:{fontSize:16,fontWeight:'bold'},
            height:35,
            top:2,
            left:10,
            width:200,
            borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED
        });
 
        (function(){
            txtTest.addEventListener('blur',function(e) {
                Ti.API.info('blur event fired: '+e.source.custom);
            });         
        })();
 
 
        row.add(lblTest);
        row.add(txtTest);
 
 
        row.className = 'coutry_row';
 
        dataTest.push(row);
    };  
 
    var tblTestSection = Ti.UI.createTableViewSection({
        headerTitle: 'Test Blur',
        rows: dataTest
    }); 
 
 
    var tblTest = Ti.UI.createTableView({
        style: Ti.UI.iPhone.TableViewStyle.GROUPED,
        data: [tblTestSection]
    });
Remove the table section and all works as expected.

1 Answer

did you try disabling touch for the tableRow and enabling it on the textField?

Your Answer

Think you can help? Login to answer this question!