Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5401] Control of Event Propagation

GitHub Issuen/a
TypeSub-task
PriorityLow
StatusClosed
ResolutionDuplicate
Resolution Date2012-08-09T11:56:56.000+0000
Affected Version/sRelease 1.7.2
Fix Version/sn/a
ComponentsTiAPI
Labelsn/a
ReporterJon Alter
AssigneeNeeraj Gupta
Created2011-10-02T23:04:06.000+0000
Updated2017-03-20T22:08:12.000+0000

Description

Would like the ability to control event propagation

Example

Would like to be able to click a button that is on a tableViewRow and not have that click event propagated to the row. Do not want to disable the row, still want to be able to click the row directly. Not just for buttons, a button is just an example.

Repro Case

Step 1: run the code below Step 2: click on the button Step 3: notice that the click event is propagated to the row and the row becomes selected
	var win = Ti.UI.createWindow({
		backgroundColor : 'white',
		fullscreen : true
	});
	var data = [];
	var row = Ti.UI.createTableViewRow({
		row: 50
	});
	var button = Ti.UI.createButton({
		title: 'test',
		height: 30,
		width: 60,
		left: 10
	});
	row.add(button);
	data.push(row);

	var tableView = Ti.UI.createTableView({
		data : data
	});
	tableView.addEventListener('click', function(e) {
		Ti.API.info("click tableView");
	});
	win.add(tableView);
	win.open();

Associated Helpdesk Ticket

http://appc.me/c/APP-368132

Comments

  1. James Wise 2011-11-23

    This feature would help me - got a scrollview nested in a scrollableview that intermittently crashes the app, even when checking for which view fired the 'scroll' event.
  2. Blain Hamon 2012-08-09

    Moving issue to bubbling spec.
  3. Lee Morris 2017-03-20

    Closing ticket as duplicate.

JSON Source