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

iOS:ipad: TableviewRow gets a double click when used inside a popover

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Low
    • Resolution: Cannot Reproduce
    • Affects Version/s: Release 3.0.0
    • Fix Version/s: Release 3.0.2
    • Component/s: iOS
    • Labels:
    • Environment:

      iOS Device: IPAD
      Mobile SDK: 3.0.0.GA
      OS: MacOSX

      Description

      Problem Description

      You will get the event click twice when using a label inside a tableviewrow inside the popoever. It only happens the second time you click the label.

      Code example

      var tabGroup = Ti.UI.createTabGroup();
      var win1 = Ti.UI.createWindow({
      	title:'test1'
      });
      var tab1 = Ti.UI.createTab({
      	title:'test1',
      	window:win1
      });
      var win2 = Ti.UI.createWindow({
      	title:'test2'
      });
      var tab2 = Ti.UI.createTab({
      	title:'test2',
      	window:win2
      });
      var win3 = Ti.UI.createWindow({
      	title:'test3'
      });
      var tab3 = Ti.UI.createTab({
      	title:'test3',
      	window:win3
      });
      tabGroup.addTab(tab1);
      tabGroup.addTab(tab2);
      tabGroup.addTab(tab3);
      tabGroup.open();
      var masterButton = Ti.UI.createButton({
      	title:'List'
      });
      var wrapper = Titanium.UI.createTableView({
      	style:Ti.UI.iPhone.TableViewStyle.PLAIN,
      	rowHeight:47,
      	top:0
      });
      var data = [];
      var row = Titanium.UI.createTableViewRow({
      	backgroundColor: '#fff'
      });
       
      //title label
      var titleLabel = Titanium.UI.createLabel({
      	text: 'Buggy Label',
      	font: {fontSize: 18},
      	left: 13,
      	top: 7,
      	height: Ti.UI.SIZE,
      	width: 230,
      	color: '#000'
      });
      row.add(titleLabel);
      data.push(row);
      wrapper.data = data;	
      var popover = Ti.UI.iPad.createPopover({
      	width:300,
      	height:1000,
      	navBarHidden:true
      });
      popover.add(wrapper);
      masterButton.addEventListener('click',function(){
      	popover.show({view:masterButton});
      });
      wrapper.addEventListener('click',function(e){
      	Ti.API.info('test');
      });
      win1.setLeftNavButton(masterButton);
      
      

      Steps to reproduce

      1. Create a new mobile project
      2. Paste this code to app.js
      3. Run this into the emulator
      4. Go to the top of the screen, click list.
      5. Click on the label.
      6. Check the Ti Studio output/terminal
      7. Click the label again
      8. you will see that the event is fired twice.

        Attachments

          Activity

            People

            • Assignee:
              shameerj Shameer Jan
              Reporter:
              mpmiranda Mauro Parra-Miranda
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code