Description:
When clicking a button quickly (not "button mashing" speed, about 114 clicks per minute) a click event listener on the button will not fire consistently. This can be demonstrated with the code below.
Clicking the button at a slower pace, around 75 clicks a minute will fire the event listener consistently
var win1 = Titanium.UI.createWindow({
title:'Click event test',
backgroundColor:'#fff',
layout: "vertical"
});
var label1 = Titanium.UI.createLabel({
color:'#999',
text:'Click counter',
font:{fontSize:20,fontFamily:'Helvetica Neue'},
textAlign:'center',
width:'auto',
top: 50
});
var myButton = Ti.UI.createButton({
title: "Click Me",
top: 100
});
var count = 0;
myButton.addEventListener("click", function(){
count=count+1;
label1.text="The count is now: "+count;
});
win1.add(label1);
win1.add(myButton);
win1.open();
Steps to reproduce:
1) Create a project with the code above
2) Run on iOS device or in simulator
3) Click button at a "brisk pace" about 114 clicks per minute
Result:
click event listener does not fire
Expected Result:
event listener fires consistently.
Additional Info: Changing the event listener from "click" to "singletap" will fire consistently regardless of button tap speed.
Issue reproduces Titanium Command-Line Interface, CLI version 3.3.0, Titanium SDK version 3.3.0.GA iOS SDK: 7.1 iOS iPhone Simulator: 7.1
I am able to reproduce this issue with the following environment; iPhone 7 (10.2) Studio 4.9.0.201705302345 Ti SDK 6.1.1.v20170623141152 Appc NPM 4.2.9 Appc CLI 6.2.1 Ti CLI 5.0.13 Alloy 1.9.11 Arrow 2.0.0 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131