Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-15540

iOS7: TableView singletap and doubletap events do not provide row information

    Details

      Description

      Problem Description

      The source of events like click, singletap, are not being reported. Instead, you get random internal information.

      Steps to Reproduce

      1. Create new mobile project with 3.1.3 in iOS
      2. Paste the testcase to app.js
      3. Run the app, click on the row.
      4. You will see the source.

      Testcase

      var rowdata = [
      {title: 'row_0'},
      {title: 'row_1'},
      {title: 'row_2'},
      ];
      var win = Ti.UI.createWindow( { backgroundColor: '#FFFFFF' } );
      var table = Ti.UI.createTableView( { data: rowdata } );
       
      // Either:
       
      table.addEventListener('singletap', eventArrived);
      //table.addEventListener('doubletap', eventArrived);
       
      // Or:
       
      //table.addEventListener('click', eventArrived);
       
      win.add(table);
      win.open();
       
      function eventArrived(e) {
      alert('Event from table: ' + JSON.stringify(e));
      }
      

      Extra info

      With singletap and doubletap events, the event contains no row information:

      [TRACE] : Event from table: {'x':222,'y':31,'bubbles':true,'type':'singletap','source':

      {'hideSearchOnSelection':true,'horizontalWrap':true,'searchHidden':false}

      ,'cancelBubble':false}
      [TRACE] : Event from table: {'x':91,'y':61,'bubbles':true,'type':'singletap','source':

      {'hideSearchOnSelection':true,'horizontalWrap':true,'searchHidden':false}

      ,'cancelBubble':false}
      [TRACE] : Event from table: {'x':145,'y':101,'bubbles':true,'type':'singletap','source':

      {'hideSearchOnSelection':true,'horizontalWrap':true,'searchHidden':false}

      ,'cancelBubble':false}
      [TRACE] : Event from table: {'x':137,'y':22,'bubbles':true,'type':'doubletap','source':

      {'hideSearchOnSelection':true,'horizontalWrap':true,'searchHidden':false}

      ,'cancelBubble':false}
      [TRACE] : Event from table: {'x':130,'y':73,'bubbles':true,'type':'doubletap','source':

      {'hideSearchOnSelection':true,'horizontalWrap':true,'searchHidden':false}

      ,'cancelBubble':false}
      [TRACE] : Event from table: {'x':129,'y':100,'bubbles':true,'type':'doubletap','source':

      {'hideSearchOnSelection':true,'horizontalWrap':true,'searchHidden':false}

      ,'cancelBubble':false}

      With click events, the event object correctly contains row information:

      [TRACE] : Event from table: {'x':122,'section':

      {'horizontalWrap':true}

      ,'row':

      {'horizontalWrap':true,'title':'row_0'}

      ,'index':0,'y':36,'rowData':

      {'horizontalWrap':true,'title':'row_0'}

      ,'searchMode':false,'detail':false,'bubbles':true,'type':'click','source':

      {'horizontalWrap':true,'title':'row_0'}

      ,'cancelBubble':false}
      [TRACE] : Event from table: {'x':135,'section':

      {'horizontalWrap':true}

      ,'row':

      {'horizontalWrap':true,'title':'row_1'}

      ,'index':1,'y':9,'rowData':

      {'horizontalWrap':true,'title':'row_1'}

      ,'searchMode':false,'detail':false,'bubbles':true,'type':'click','source':

      {'horizontalWrap':true,'title':'row_1'}

      ,'cancelBubble':false}
      [TRACE] : Event from table: {'x':166,'section':

      {'horizontalWrap':true}

      ,'row':

      {'horizontalWrap':true,'title':'row_2'}

      ,'index':2,'y':23,'rowData':

      {'horizontalWrap':true,'title':'row_2'}

      ,'searchMode':false,'detail':false,'bubbles':true,'type':'click','source':

      {'horizontalWrap':true,'title':'row_2'}

      ,'cancelBubble':false}

      Expected Result

      Row information from singletap, doubletap, and click events (as per current API documentation).

        Attachments

        1. .log
          1.29 MB
          Rudolf Cardinal
        2. bugtest_table_events.js
          3 kB
          Rudolf Cardinal
        3. diagnostic7873121913403312023.log
          13 kB
          Rudolf Cardinal

          Activity

            People

            • Assignee:
              vduggal Vishal Duggal (Inactive)
              Reporter:
              rudolf@pobox.com Rudolf Cardinal
              Reviewer:
              Pedro Enrique (Inactive)
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-17677
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code