Problem Description
As per the attached sample, once the red row is clicked, touchenable of the tableview is set to false. This property has to reset to true on focus of the window. This works fine on iphone, but the tv.touchEnabled = true never happens on mobileweb.
Actual Results
This is not working fine in mobileweb (the tableview is never touchable again)
Expected results
Working just fine, as in iOS.
TestCase
1. Create mobile project.
2. Add this to app.js
var win1 = Titanium.UI.createWindow({backgroundColor:'#e7e7e7'});
var data=[];
var tabGroup = Titanium.UI.createTabGroup();
var tab1 = Titanium.UI.createTab({
icon:'KS_nav_views.png',
title:'Tab 1',
window:win1
});
var win2 = Titanium.UI.createWindow({backgroundColor:'#000'});
var tab2 = Titanium.UI.createTab({
icon:'KS_nav_views.png',
title:'Tab 2',
window:win2
});
var row1 = Titanium.UI.createTableViewRow({
height : 70,
backgroundColor : 'red',
childWin:'Row1'
});
data.push(row1);
var row2 = Titanium.UI.createTableViewRow({
height : 70,
backgroundColor : 'blue',
childWin:'Row2'
});
data.push(row2);
var tv = Ti.UI.createTableView({
data:data
});
tv.addEventListener('click',function(e){
if(e.row.childWin === 'Row1'){
tv.touchEnabled = false;
alert('row1 is clicked')
}
});
win1.addEventListener('focus',function(e){
Ti.API.debug('focus fired')
tv.touchEnabled = true;
})
win1.add(tv);
tabGroup.addTab(tab1);
tabGroup.addTab(tab2);
tabGroup.open();
Pull Request: https://github.com/appcelerator/titanium_mobile/pull/2402
Verified the issue on the environment below & found it to be nor reproducible.when reset on focus of the window tv.touchEnabled = true is now happening on mobileweb. Titanium Studio : 2.1.0.201206251749 SDK version : 2.1.0.v20120626104306 Chrome : 19.0.1084.56