Problem
The click event is raised for every object on a view. For example if I have a view with a label (custom button). The click event will be raised twice when the user taps the view.
Regession issue - works fine with mobile SDKs 1.7.4.v20111025165811 & 1.7.3 & 1.7.2
Reproducible Steps
1. Run the sample code
2. Click the "Click me" label
3. Check the Titanium logs
Sample Code
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff',
tabBarHidden:true
});
var vwTest = Ti.UI.createView({
backgroundColor:'yellow',
height:250,
width:250
});
win1.add(vwTest);
vwTest.addEventListener('click', function(){
Ti.API.info('You should only see this once per click... but');
Ti.API.info('Click Event Firing');
});
var label1 = Titanium.UI.createLabel({
text:'Click Me',
color:'#000',
font:{fontSize:20,fontFamily:'Helvetica Neue'},
textAlign:'center',
height:250,
width:250
});
vwTest.add(label1);
win1.open();
Associated HelpDesk Ticket
http://appc.me/c/APP-287373
Tested on Ti Studio 1.0.7.201112061404 Ti Mob SDK 1.8.0.1.v20111207091653 OSX Lion iPhone 4S OS 5.0.1 Expected behavior of only sending single click events is shown