Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15538] iOS7: Clicking a label in first row of table view is not working on 3.1.3GA version

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionDuplicate
Resolution Date2013-10-21T16:23:12.000+0000
Affected Version/sRelease 3.1.3
Fix Version/sn/a
ComponentsiOS
LabelsSupportTeam
ReporterMurali Rama
AssigneeIngo Muschenetz
Created2013-10-17T05:11:16.000+0000
Updated2014-06-19T12:42:50.000+0000

Description

Problem Description

When I press a label in first row of table view, it is returning [object TiUITableViewRow] instead of [object TiUILabel]. All other rows, it is returning correct label [object TiUILabel]. What could be a reason for this issue happening for only first row? This issue happens only with 3.1.3GA version when I compiled for iPhone/iPad.

Test case

var win = Ti.UI.createWindow({
});

function makeRow () {
    var row = Ti.UI.createTableViewRow({	
		height:45
	});
	row.add(Ti.UI.createLabel({
		text:"label",
		top:0,
		left:15,
		height:30,
		touchenabled: false,
	}));
	return row;   
}

 
var table1 = Ti.UI.createTableView({
        top:60,
	    left:0,
	    right:20,
	    bottom:40,
});

function refreshItemnames(){  
 		for(var i=0;i<25;i++)
			table1.appendRow (makeRow());
}

refreshItemnames();
    
table1.addEventListener('click', function(e) {
    Ti.API.info("e.row =" + e.row + ", e.source = " + e.source + ", e"+e);
});
win.add(table1);
win.open();

Steps to reproduce

1. Create a new mobile project for iOS7, with 3.1.3 2. Paste the testcase into app.js 3. Run in the simulator 4. Click on the first row. 5. Click on the second row. 6. Check console, you will see the difference, even if you created the two rows in the same way.

Extra info

Log when 1YY label is clicked in TableView: First row output: [INFO] e.row =[object TiUITableViewRow], e.source = [object TiUILabel] Second or any other row is clicked: [INFO] e.row =[object TiUITableViewRow], e.source = [object TiUITableViewRow]

Attachments

FileDateSize
app.js2013-10-18T05:07:12.000+00001364
app.js2013-10-17T05:11:16.000+00002729

Comments

  1. Jamie Buckley 2013-10-18

    Hi Murali, Your test case contains a lot of extra code to demonstrate this issue, have you been able to reproduce this with the bare minimum code? if so can you provide the sample for this? Thanks.
  2. Murali Rama 2013-10-18

    Hi Jamie, I removed further code and provided minimal code to reproduce this issue. It is attached new "app.js" file which is uploaded. Log when YY label is clicked in TableView: First row output: [INFO] e.row =[object TiUITableViewRow], e.source = [object TiUITableViewRow] Second or any other row is clicked: [INFO] e.row =[object TiUITableViewRow], e.source = [object TiUILabel]
  3. Mauro Parra-Miranda 2013-10-21

JSON Source