This is a migrated thread and some comments may be shown as answers.

swipe coolidates with button

2 Answers 58 Views
Touch
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 24 Sep 2014, 07:00 AM
Hi,

we have a view (detailedView) with an image button. The image is about half of the screen. With the image button you can navigate to another view (imageGallery)
<p><a class="imageGallery-button" data-role="button" href="imageGallery.html?id=#=id#">
       <img src="#=imageGallerySplash#" width="100%" /></a>
   </p>

Also on the detailedView we want to give the possibility to navigate back with a swipe. So if you swipe to the right the app navigates back. This works fine so far.
$("#is-detailedView").kendoTouch(
           {
               enableSwipe: true,
               swipe: function (e) {
           if(e.direction === "right")
           {
                 app.navigateToView("#:back");
            }
       } });

But the problem arises if you swipe on the image button.
Then the app navigates back and directly afterwards navigates to the image gallery. It seems that if you start the swipe the button triggers and after the swipe event the app handles the button event.

Is there any possibility to suppress or cancel button events during the swipe events?

Thank you and
Best regards
Mark

2 Answers, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 25 Sep 2014, 11:37 AM
Hello Mark,

there are several means to work around that problem, but before we move into that, I would like to ask you if you are using the latest version of Kendo UI. One or two releases ago, we refined the app navigation behavior, and the buttons no longer navigate when swiped. Please let me know the exact Kendo UI version you are using, so that we may rule that out as an option. 

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Mark
Top achievements
Rank 1
answered on 25 Sep 2014, 11:48 AM
Hi,

perfect. Updating to the latest version solved the problem. Before we had 2014.1.xxx and with the latest version it works like a charm.

Thank you very much

Best regards.
Mark
Tags
Touch
Asked by
Mark
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Mark
Top achievements
Rank 1
Share this question
or