Parity Problem
When you add the button directly to the row, the event doesn't fire when you click on the left side of the row (actual behavior).
Expected behavior
The click event fired when clicking on a row
Tested on
iOS 5.1 simulator
Droid Razr 2.3.5
Repro sequence
var win = Ti.UI.createWindow({
backgroundColor : '#00ffff'
});
var tableView = Titanium.UI.createTableView({
allowsSelection: true
});
var row = Ti.UI.createTableViewRow({
height: 60,
className: 'row'
});
var btnSw = Titanium.UI.createButton({
right:0,
height: 50,
width: 50,
title: 'foo',
sw:true
});
btnSw.addEventListener('click', function(e) {
alert('Button');
})
row.add (btnSw);//if you remove the button the row will be able to get the click event
tableView.addEventListener('click', function(e) {
alert('got click');
});
tableView.setData ([row]);
win.add (tableView);
win.open ();
Thanks, Ivan. This is indeed a duplicate of TIMOB-9867.
That was on accident when addressing the customer issue, just to keep track.
Closing ticket as duplicate of the ticket that is mentioned above and has since been closed.