Problem description
Adding a 'longclick' event listener to a TableView will also fire the 'click' event if the row inside the TableView has a child view.
Steps to reproduce
1. Use the code below
2. Click on the row: 'click' is fired
3. Long-click on the row: 'longclick' is fired, but also 'click'
var win = Ti.UI.createWindow({ backgroundColor: 'white' });
var table = Ti.UI.createTableView({ minRowHeight : 40 });
var row = Ti.UI.createTableViewRow({
className: 'row',
touchEnabled: true,
height: 200
});
var view = Ti.UI.createView({width:Ti.UI.SIZE,height:Ti.UI.FILL});
row.add(view);
table.setData([row]);
table.addEventListener('longclick', function(e) {
alert("LONG CLICKED");
});
table.addEventListener('click',function(e) {
alert("CLICKED");
});
win.add(table);
win.open();
master PR: https://github.com/appcelerator/titanium_mobile/pull/5488
Click event does not fire with Longclick event. Verified on: OSX: 10.9.2 SDK: 3.3.0.v20140414214115 Appc Studio: 3.2.3.201404111117 CLI:3.2.3-alpha3 Android Device: Nexus5 (v4.4.2)