[AC-3065] Android - click and longclick handlers for TableView receive different event objects
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Needs more info |
Resolution Date | 2011-10-20T13:10:38.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | android, mobilesdk |
Reporter | Steen Hive |
Assignee | Paul Dowsett |
Created | 2011-10-17T08:58:26.000+0000 |
Updated | 2016-03-08T07:48:06.000+0000 |
Description
Given the following program
var win = Titanium.UI.createWindow({
title:'Window',
backgroundColor:'#fff',
fullscreen: true
});
var tableData=[];
var row = Ti.UI.createTableViewRow({
className: "grid",
height: 120
});
var cell = Ti.UI.createView({
width: 'auto',
height: '120'
});
var label = Ti.UI.createLabel({
width: 'auto',
height:'auto',
textAlign: 'center',
text: 'Hello, World!',
touchEnabled:false
})
cell.add(label);
row.add(cell);
tableData.push(row);
var tv = Ti.UI.createTableView({
data: tableData
});
tv.addEventListener('click',function(e){
Ti.API.info(JSON.stringify(e.source));
});
tv.addEventListener('longclick',function(e){
Ti.API.info(JSON.stringify(e.source));
});
win.add(tv);
win.open();
'click' event handler receives "[Ti.UI.View]" as source
'longclick' event handler receives "[Ti.UI.TableView]" as source
Thank you for raising this ticket. If this is still an issue, then we need all the information listed in the [Jira Ticket Checklist](http://wiki.appcelerator.org/display/guides/Contributing+to+Titanium#ContributingtoTitanium-Summary%3AJiraTicketChecklist) in order to accept the ticket. Once the ticket is complete, we will look into moving it to the main project. Thank you.
Closing due to inactivity. If this issue still exists, please raise a new ticket, including all the information in the [JIRA Ticket Checklist](https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-JIRATicketChecklist) to ensure that we can escalate it quickly. Read [How to Submit a Bug Report](https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report) if you have not read it before, and always start a ticket using the [JIRA Ticket Template](https://wiki.appcelerator.org/display/guides/JIRA+Ticket+Template). Thanks in advance