Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5553] MobileWeb: event.source of tableView always return tableViewRow object

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2011-09-21T05:45:27.000+0000
Affected Version/sRelease 1.7.0
Fix Version/sRelease 1.7.2, Backlog
ComponentsMobileWeb
Labelsn/a
ReporterMisha Vasko
AssigneeMisha Vasko
Created2011-09-13T01:35:33.000+0000
Updated2017-03-04T00:12:35.000+0000

Description

event.source of tableView always return tableViewRow object. Current behavior: After event was fired in tableView it returns event. event.source always has value equals to tableViewRow object which was clicked. Expected bahavior: event.source should return an object which was clicked in tableViewRow (label, button, etc). This behavior is present in the iOS. How to reproduce: run KS_HTML5 >> Table View >> Table View(Layout 2) >> Click different parts of the row (date, photo, plus button, etc). Expected behavior: you should see "source - [object Label]" or "source - [object Button]" but not "source - [object TableViewRow]".
tableView.addEventListener('click', function(ev)
{
	console.log('source - ' + ev.source);
	// use rowNum property on object to get row number
	var rowNum = ev.index;
	var updateRow = createUpdateRow('You clicked on the '+ev.source.clickName);
	tableView.updateRow(rowNum,updateRow,{animationStyle:Titanium.UI.iPhone.RowAnimationStyle.LEFT});
});

Comments

  1. Lee Morris 2017-03-04

    Closing ticket due to MobileWeb no longer being supported.

JSON Source