Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9422] MobileWeb: Tableview.touchEnabled is not working on mobileweb

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-06-15T13:09:54.000+0000
Affected Version/sRelease 2.1.0
Fix Version/sRelease 2.1.0, Sprint 2012-12 MW
ComponentsMobileWeb
Labelsn/a
ReporterMauro Parra-Miranda
AssigneeBryan Hughes
Created2012-06-06T11:45:09.000+0000
Updated2012-06-26T14:17:24.000+0000

Description

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();

Comments

  1. Bryan Hughes 2012-06-14

    Pull Request: https://github.com/appcelerator/titanium_mobile/pull/2402
  2. Lokesh Choudhary 2012-06-26

    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

JSON Source