Titanium

[ALOY-466] Alloy TableViews with sections not reliably passing 'click' events

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-01-29T18:10:23.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 03
ComponentsRuntime, XML
Labelsalloy, events, tableview, tableviewsection
ReporterJoel Margolese
AssigneeTony Lukasavage
Created2013-01-16T06:59:47.000+0000
Updated2014-01-29T00:07:11.000+0000

Description

If you create a TableView in an Alloy View, and then populate it with TableViewRow's which are created from Alloy view files, then click events are not passed to the parent. NOTE: if you create rows in dynamically in code or pre-defined in the TableView.xml file, then click events are passed. ref: [Q&A | http://developer.appcelerator.com/question/146467/alloy-tableviews-with-sections-not-passing-click-events] code to reproduce: *index.xml*
<Alloy>
    <Window>
    <TableView id="jobsTable" onClick="rowWasClicked">
        <TableViewSection id="activeSection" headerTitle="Current jobs"/>
        <TableViewSection id="futureSection" headerTitle="Future jobs">
           
        </TableViewSection>
    </TableView>
    </Window>   
</Alloy>
*testRow.xml* (.js and .ts files are blank)
<Alloy>
    <TableViewRow id="row">
        <View id="view" backgroundColor="red" width="20" height="20"  />
    </TableViewRow>
</Alloy>
*index.js*

function rowWasClicked(e) {
    alert('you pressed me');
}
 
for (var i = 0; i < 5; i++) {
   //$.activeSection.add(Ti.UI.createTableViewRow({title: 'row ' + (i+1)}));
 
   var args = {};
   var row = Alloy.createController('testRow', args).getView();
    //row.bubbleParent = true;
 
     $.activeSection.add(row);
 
}
 
$.index.open();
_notes_ (tableViewRow.xml is code I took from the TableViewRow online doc.) If I remove the View (in the row), it works perfectly. If the View is in place, then only the 1st row responds to taps. (Using the iOS simulator.) The other rows are silent. It seems that other elements (