The problem
Events are not propagated to table view when it contains complex rows (that is, rows that contain other components like buttons and labels).
Test case
To see this issue, run this example:
var win = Ti.UI.createWindow({
backgroundColor: '#000',
navBarHidden: true
});
var tableView = Ti.UI.createTableView();
var rows = [], row;
for (var i = 0; i < 10; ++i) {
row = Ti.UI.createTableViewRow({ layout: 'horizontal' }),
row.add(Ti.UI.createLabel({ left: 20, text: 'Label ' + i }));
row.add(Ti.UI.createButton({ left: 20, title: 'Button ' + i }));
rows[i] = row;
}
tableView.setData(rows);
var counter = 0;
tableView.addEventListener('click', function(e) {
Ti.API.info('Table view clicked ' + (++counter));
Ti.API.info(e.source);
});
win.add(tableView);
win.open();
Click on label or button and you'll see that output is generated.
Click on row (right from button) and the output won't be generate, which means event is not triggered.
Expected behavior
Click on table view row should trigger table view's click event.
This works fine on iOS.
This is not regression, doesn't work with 1.8.3 either.
Interesting is that if row's content is wrapped with TiUIView, this issue does not happen.
Background environment
It happens on Android OS 2.2 & 2.3.5 versions as well not only on Android 3.1 tabletsTested on
Razr 2.3.5 device LG Ally 2.2Appears to be fixed with changes for TIMOB-10238, TIMOB-6723, and TIMOB-10458. Note that the pull requests for TIMOB-6723 and TIMOB-10458 are pending at this time.
I can't reproduce with latest changes to 3.0.X.
Closing ticket as I am unable to reproduce the issue using the following environment; Pixel (7.1) 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