The problem
This issue only appears if there is a view in the rows. If there is no view in the rows, then the table functions as expected.
Repro steps
1. Press down on a table row causing it to highlight.
2. Drag the table row without releasing to view later rows.
3. Release the drag and click on a different row.
4. The row that was selected previously will be the row that receives the click event.
The code:
var win = Ti.UI.createWindow({
backgroundColor:'white',
});
var table = Ti.UI.createTableView({
width: 320,
height: 255,
separatorColor :'transparent',
separatorStyle:Titanium.UI.iPhone.TableViewSeparatorStyle.NONE,
style:Titanium.UI.iPhone.TableViewStyle.GROUPED,
backgroundColor:'transparent',
backgroundSelectedColor:'transparent',
focusable: false,
top:0,
bottom: 0
});
var tableRows = [];
for(var i = 0; i < 6; i++) {
var row = Titanium.UI.createTableViewRow({
height: 60
});
var view = Ti.UI.createView({
top:5, right:5, left: 5, bottom:5,
backgroundColor: '#ccc'
});
var label = Ti.UI.createLabel({
text:'This is row: ' + i,
top:10,
left:10
});
view.add(label);
row.add(view);
tableRows.push(row);
}
table.setData(tableRows);
table.addEventListener('click', function(e) {
alert(e.index);
});
win.add(table);
win.open();
Tested with 3.x on CI Build and it is working properly, closing ticket for now.