Hi,
I am trying to listen to a swipe event across my entire Kendo mobile application. My best attempt is as follows:
This works in the graphite simulator and on android devices. However, on an iPhone the event is only fired on the initial view before navigating anywhere. After navigating to another view it no longer fires, even when returning to the initial view. I figure the event handler is dropped after the DOM is modified but it's hard to debug on the iPhone.
I did get this working by rebinding this event handler to the body every time the application viewShow event fired, but this didn't seem right and I think I noticed a hit to performance.
Is this a bug with Kendo mobile or is there a better way to go about this? I want to avoid having to wire up each of my views individually if possible.
Regards
Dean
I am trying to listen to a swipe event across my entire Kendo mobile application. My best attempt is as follows:
$(document.body).kendoTouch({
enableSwipe:
true
,
minXDelta: 20,
swipe:
function
(e) {
console.log(
"swipe "
+ e.direction);
alert(
"swipe "
+ e.direction);
if
(e.direction ==
"right"
) {
if
(app.pane.history.length > 1){
app.navigate(
"#:back"
);
}
}
}
}
);This works in the graphite simulator and on android devices. However, on an iPhone the event is only fired on the initial view before navigating anywhere. After navigating to another view it no longer fires, even when returning to the initial view. I figure the event handler is dropped after the DOM is modified but it's hard to debug on the iPhone.
I did get this working by rebinding this event handler to the body every time the application viewShow event fired, but this didn't seem right and I think I noticed a hit to performance.
Is this a bug with Kendo mobile or is there a better way to go about this? I want to avoid having to wire up each of my views individually if possible.
Regards
Dean