Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16561] iOS: Click event on TableViewRow inside a ScrollView does not fire if scrolled out of viewport

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionWon't Fix
Resolution Date2014-03-17T17:15:57.000+0000
Affected Version/sRelease 3.2.0, Release 3.2.1
Fix Version/sn/a
ComponentsiOS
LabelssupportTeam
ReporterRupesh Sharma
AssigneeIngo Muschenetz
Created2014-03-06T09:15:19.000+0000
Updated2017-03-22T23:02:39.000+0000

Description

Description

I have a horizontal scrollview as the first row in a tableView. This scrollview has a click event. The click event works fine on start. But if I scroll the tableView and the first row (scrollview) scrolls out of the iPad viewport, the click event stops responding.

Steps to Reproduce

1. Create the project with below sample code 2. Run the application 3. Click on first row which is scroll view Actual result: Nothing happened Expected result: Click event should get fire

Test Case

Ti.UI.backgroundColor = 'white';
var win = Ti.UI.createWindow({
	top : 20
});

var table = Ti.UI.createTableView();

var tableData = [];

var row1 = Ti.UI.createTableViewRow({
	height : 100,
	title : 'row1',
	touchEnabled : false
});

var scrollView = Ti.UI.createScrollView({
	backgroundColor : 'yellow',
	touchEnabled : true,
	bubbleParent : true
});

scrollView.addEventListener('click', function() {
	Ti.API.info('SV CLICKED');
});

table.addEventListener('click', function(e) {
	Ti.API.info('ROW CLICKED' + JSON.stringify(e));
});
var view = Ti.UI.createView({
	backgroundColor : '#336699',
	borderRadius : 2,
	top : 5,
	left : 1500,
	width : 50,
	height : 50
});

view.addEventListener('click', function() {
	Titanium.API.info('View Clicked');
});
scrollView.add(view);

row1.add(scrollView);

tableData.push(row1);

for ( i = 2; i <= 10; i++) {
	var row = Ti.UI.createTableViewRow({
		height : 100,
		title : 'row ' + i
	});

	tableData.push(row);

}
table.setData(tableData);

win.add(table);
win.open();


Comments

  1. Ingo Muschenetz 2014-03-17

    This is considered unsupported behavior, so a "Won't Fix."
  2. Lee Morris 2017-03-22

    Closing ticket as "Won't Fix".

JSON Source