Page 1 of 1

Prevent cell click when swiping

Posted: Thu Jun 05, 2014 10:56 am
by pjamourik

Hi Guys,

Can someone tell me how to do this, i can't find a solution.

I got 2 events :

  1. Cell click load details page

  2. Page swipe go to another page

    Everytime I do a page swipe, also the cell click event is launched...is there a solution to this?

    Any help would be appreciated!

    grts,

    Peter


Prevent cell click when swiping

Posted: Thu Jun 05, 2014 2:58 pm
by Maryna Brodina

Hello!

Try using Tap event instead Click.


Prevent cell click when swiping

Posted: Thu Jun 05, 2014 11:17 pm
by Yurii Orishchuk

Hi Peter.

The case that's you have described is normal browser behavior.

But if you want to disable this "click" event please add to your "Swap" JS event handler following code:

precode

var target = jQuery(arguments[0].target);

var mouseup = function(event){
event.stopPropagation();

Code: Select all

 target.unbind("mouseup", mouseup); 

};
target.bind("click", mouseup);

/code/pre

Regards.


Prevent cell click when swiping

Posted: Fri Jun 06, 2014 7:23 am
by pjamourik

Hi Guys,

Thanks for the help, I will try the suggestions today and let you know.

Regards,

Peter


Prevent cell click when swiping

Posted: Fri Jun 06, 2014 7:27 am
by pjamourik

Hi Maryna,

Is it correct that there is no "Tap" event on a grid cell?

Grts,

Peter