Titanium Community Questions & Answer Archive

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

BUG?: canceling swipe-to-delete returns faulty click event

Canceling a swipe-to-delete fires click event without correct information. Is there a formal value to look for to "ignore" this click? I'm catching this by checking that e.rowData is defined, but suspect there should be something else to test.

You can reproduce this in Kitchen Sink:

Views > Table Views > Delete Mode (2)

First alert (after canceling swipe-to-delete) is full of undefined values for a table view click. Next click is normal.

— asked April 5th 2010 by Brad Broulik
  • swipe-to-delete
  • tableview

4 Answers

  • im having the same problem.
    my table has a click event that gets fired when canceling the delete.
    any ideas how to fix it? im trying a conditional statement with the editable property but nothing yet.

    — answered April 25th 2011 by natalia caamal
  • Tableview and tableviewrows apparently do not support swipe, click and some other events consistently. I also haven't found a workaround either.

    — answered May 12th 2011 by brian kurzius
  • I have this problem as well. I've tried catching this with a "swipe" and a "click" event listener, but it doesn't seem to be working. It's very annoying because then it is opening a page with null values and causing some big problems in development.

    — answered May 12th 2011 by Colton Arabsky
  • I just dealt with this in my app. This is how I solved it (in my click event listener):

    var source = e.source + ""; // need source as string
    if (source.indexOf('TiUITableViewRow') >0) {
      // do stuff here

    When the delete is canceled, the click event source is TiUITableView rather than the row, so I ignore any click event that isn't on the row. If you have custom rows, you'll need to add the other objects in here to detect clicks, like TiUILabel.

    — answered May 12th 2011 by Oliver Nelson
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.