Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Click and dblclick events problem in child views

If I add a click event to a parent view, then remove the event, the click or dblclick events of the children views no longer fires. I even tried to add the click or dblclick event again to the children, it still does not get fired.

Seems like as soon as I add a click event to the parent, the children's event handling is messed up, even if I remove the parent event dynamically. Does anyone has the same problem? Any work around? I'm using the iphone emulator.

— asked November 4th 2010 by Tommy Tam
  • child
  • click
  • dblclick
  • event
  • parent
  • view
0 Comments

1 Answer

  • Wow, this was tricky, but figured it out…

    If you disable click event from the parent view, all click or dblclick events of the children views will be disabled. Therefore, if you want the children to have dblclick event, you have to have at least add back a dblclick event that does nothing in the parent view for them to work.

    — answered November 4th 2010 by Tommy Tam
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.