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

iOS: Scroll click event hanging over in event firing for iOS tableview

    Details

      Description

      /*
       * A simple project based on Single Window Application Template:
       * to test minimal cases
       */
       
      //bootstrap and check dependencies
      if (Ti.version < 1.8 ) {
      	alert('Sorry - this application template requires Titanium Mobile SDK 1.8 or later');	  	
      }
       
      // This is a single context application with mutliple windows in a stack
      (function() {	
      	var self = Titanium.UI.createWindow({
              title: 'Window',
              backgroundColor: 'white',
              });    
       
       
          var row;
          var data = [];
              
          for(i=0;i<10;i++) {
                  var l = Ti.UI.createLabel({text: "Test row " + i, left: '10dp', right: '30dp' });
                  var r = Ti.UI.createTableViewRow({rownumber: i, hasCheck: false, backgroundColor: '#eeeeee', className: 'datarow'});
                  r.add(l);
                  data.push(r);
          }
              
          var tv = Ti.UI.createTableView({
                  data: data,
                  backgroundColor: 'transparent',
                  style: Ti.UI.iPhone.TableViewStyle.GROUPED,
                  minRowHeight: '52dp',
                  top: '30dp', bottom: '60dp'
          });
       
          tv.addEventListener('click', function(e){
              Ti.API.info("Row number " + e.row.rownumber + " clicked");
              e.row.hasCheck = !e.row.hasCheck;
          });
          
          self.add(tv);
          self.open();
      })();
      

      Run the above code
      Click row 1
      Scroll up "using row 6" so that row 1 disappears from view and 2 is top
      Click row 4
      A check will appear in row 6 and event will fire saying row 6 clicked

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vduggal Vishal Duggal (Inactive)
                Reporter:
                ndastur Neville Dastur
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Source Code