Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12791] iOS:ipad: TableviewRow gets a double click when used inside a popover

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-04-05T08:34:15.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sRelease 3.0.2
ComponentsiOS
LabelsSupportTeam
ReporterMauro Parra-Miranda
AssigneeShameer Jan
Created2013-02-20T02:35:35.000+0000
Updated2017-03-28T17:24:23.000+0000

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.

Comments

  1. Shameer Jan 2013-04-05

    Issue does not reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 iOS iPad Simulator: iOS SDK version: 6.0
  2. Lee Morris 2017-03-07

    Unable to reproduce with the following environment; iPhone 7 and Simulator (10.2) MacOS 10.11.6 (15G31) Studio 4.8.1.201612050850 Ti SDK 6.0.2 GA Appc NPM 4.2.8 Appc CLI 6.1.0 Ti CLI 5.0.11 Alloy 1.9.5 Arrow 1.10.1 Xcode 8.2 (8C38) Node v4.6.0 Java 1.7.0_80

JSON Source