[TIMOB-5401] Control of Event Propagation
GitHub Issue | n/a |
---|---|
Type | Sub-task |
Priority | Low |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2012-08-09T11:56:56.000+0000 |
Affected Version/s | Release 1.7.2 |
Fix Version/s | n/a |
Components | TiAPI |
Labels | n/a |
Reporter | Jon Alter |
Assignee | Neeraj Gupta |
Created | 2011-10-02T23:04:06.000+0000 |
Updated | 2017-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();
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.
Moving issue to bubbling spec.
Closing ticket as duplicate.