Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20511] iOS: TableView touchend and touchstart event property index is null after upgrading to 5.2.0 SDK

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2016-03-07T19:50:48.000+0000
Affected Version/sn/a
Fix Version/sRelease 5.2.1
ComponentsAndroid, iOS
Labelsqe-5.2.1, regression
ReporterEric Cheung
AssigneeSrikanth Sombhatla
Created2016-02-29T00:52:08.000+0000
Updated2016-03-08T18:54:47.000+0000

Description

Noticed something odd with my table rows not clickable after building in 5.2.0 SDK on one of my apps. It seems like e.index is returning null on the event listener callback for "touchend". Steps to Reproduce: * Create new Mobile App * Apply the index.js * Compile in 5.1.2 SDK and run * Console.log should return the index. * Recompile in 5.2.0 SDK and run * Console.log returns Touch events such as "singletap" do return the index. I did not see this documented anywhere on 5.2.0 so I am creating this issue as a bug.

Attachments

FileDateSize
index.js2016-02-29T00:52:38.000+0000271
index.xml2016-02-29T00:52:55.000+0000151

Comments

  1. Eric Cheung 2016-02-29

    replace the index files to a new mobile app project
  2. Ashraf Abu 2016-03-04

    Tested this on 5.2.0.GA. TableView is created on Android and can be seen if you change the index.tss color of container to
     
       ".container": {
       	backgroundColor:"black"
       }
       
    When you click the correct row, it shows the corresponding number.
  3. Srikanth Sombhatla 2016-03-04

    PR for 5_2_X: https://github.com/appcelerator/titanium_mobile/pull/7802 PR for master: https://github.com/appcelerator/titanium_mobile/pull/7804 Can verify with the following app.js
       Ti.UI.backgroundColor = 'white';
       var win = Ti.UI.createWindow();
       
       var tableData = [ {title: 'Apples'}, {title: 'Bananas'}, {title: 'Carrots'}, {title: 'Potatoes'} ];
       
       var table = Ti.UI.createTableView({
         data: tableData
       });
       
       
       table.addEventListener('touchstart', function(e) {
       	console.log("touchstart:"+JSON.stringify(e));
       	console.log("index:"+e.index);
       }); 
       
       table.addEventListener('touchend', function(e) {
       	console.log("touchend:"+JSON.stringify(e));
       	console.log("index:"+e.index);
       }); 
       
       win.add(table);
       win.open();
       
  4. Chee Kiat Ng 2016-03-04

    CR and FT passed. PRs merged!
  5. Harry Bryant 2016-03-07

    Verified as fixed, using SDK 5.2.1.v20160303223838 console.log returns index value instead of . Tested on: iPhone 6S (9.2) , iPhone 6 (8.4) , Android Nexus 6P (6.0) Mac OSX El Capitan 10.11.3 (15D21) Ti SDK: 5.2.1.v20160303223838 Appc Studio: 4.5.0.201602170821 Appc NPM: 4.2.3 App CLI: 5.2.0 Xcode 7.2 Node v4.2.6 production *Closing ticket.*

JSON Source