GSto GSto - 8 months ago 42
iOS Question

How do I prevent event bubbling in a Titanium Alloy view?

In the documentation, it seems that you can prevent bubbling by passing an arguments to an click event on a text field:!/api/Titanium.UI.TextField-event-click

Using their new Alloy framework, I have a textfield declared like so:

<TextField id='name' onClick='doStuff' />

and in my controller I have this function:

function doStuff(e) {

However, this element is wrapped in a container element which also has an onClick event, and I would like to prevent that one from firing when I click on the text field. how can I accomplish this?



function doStuff(e){
    e.cancelBubble = true;