TitaniumでwebViewのシングルタップを取りつつ、スクロールを止めたくない場合
Titaniumのコード側でwebViewに直接イベントを付けたり、
htmlの中のJSでやろうとしても、toucstart、touchmoveのイベントを付けると、
スクロールしなくなってしまう。
なので、html内のJSからtouchendのみにイベントを付け、スクロールの値を見て、
動いていなければシングルタップのイベントをTitanium側に送るようにした。
document.addEventListener("touchend", touchEnd, true);
var yy = 0;
function touchEnd(e) {
e.preventDefault();
var currentScrollY = document.body.scrollTop;
if(yy == currentScrollY){
Ti.App.fireEvent('singleTap');
}
yy = currentScrollY;
}