[AC-2196] ListView Event Handler crashes app when reading row data
GitHub Issue | n/a |
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Needs more info |
Resolution Date | 2013-03-28T21:11:07.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Itay Avtalyon |
Assignee | Mauro Parra-Miranda |
Created | 2013-03-28T12:38:01.000+0000 |
Updated | 2016-03-08T07:41:11.000+0000 |
Description
Steps to Reproduce
In a template, attach an event listener to one of the sub-views. Add 'touchstart' event listener.
Trying to get the data of the row like this:
var index - e.rowIndex;
var section = e.section;
var data = section.getItemAt(index).
Will crash. Furthermore, e.rowIndex is undefined. e.itemIndex does return the right index for the row.
When the event is switched to click instead, everything works.
Actual Result
Crash.
Expected Result
Getting the row data.
Attachments
Itay, Would you mind providing a piece of reproducible test code that displays this issue, one that can be simply copied and pasted into an app.js and that clearly shows the problem. When submitting bugs with this relevant data it ensures a much quicker review time and can be more quickly moved to engineering for the fix. For future reference: https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report Thank you for your patience, Carter
A sample App.JS that has sample data with three views demonstrating the problem
Uploaded a sample app with sample data. In each row, clicking the yellow and green views the application crashes. Clicking the red shows the expected results. (Also, Ti.UI.SIZE doesn't seem to work when applied to the height of the row in this template).