
OfficeHeart
Top achievements
Rank 1
OfficeHeart
asked on 29 Nov 2012, 03:21 PM
Hello,
I have a listview with tap and hold events:
- onTap: navigate to something
- onHold: show actionsheet
Now after the hold event, the tap event is also generated. How can I cancel that event?
Here is the jsBin http://jsbin.com/egasev/1/edit
Thanks,
Koen
P.S. Maybe you can make a Touch forum for these questions.
I have a listview with tap and hold events:
- onTap: navigate to something
- onHold: show actionsheet
Now after the hold event, the tap event is also generated. How can I cancel that event?
Here is the jsBin http://jsbin.com/egasev/1/edit
Thanks,
Koen
P.S. Maybe you can make a Touch forum for these questions.
5 Answers, 1 is accepted
0
Hello Koen,
Iliana Nikolova
the Telerik team
I am afraid what you are trying to achieve is not supported in Kendo UI Mobile. We may consider changing this for future versions in the product, but at this point there is no suitable workaround I can suggest. Please excuse us for the inconvenience caused.
Regards,Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Accepted
Hi Koen,
Iliana Nikolova
the Telerik team
After further discussions with the team I am glad to say we managed to find a workaround that may suit your requirements. Take a look at the following code snippet:
<script>
var
hold;
function
onTouchStart(e){
hold =
false
;
}
function
onTap(e) {
if
(!hold) {
alert(
'tap'
);
}
}
function
onHold(e) {
hold =
true
;
alert(
'hold'
);
$(
"#companyActionsList"
).data(
"kendoMobileActionSheet"
).open();
}
window.kendoMobileApplication =
new
kendo.mobile.Application(document.body);
</script>
In the touchStart event assigned false value to the hold variable and made some additional checks. For your convenience I updated the jsBin example to illustrate the suggested approach in action.
Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0

Sergey
Top achievements
Rank 2
answered on 21 Jul 2014, 06:20 PM
Hello, I've faced with this issue, is it already solved or I have to use this workaround?
0
Hello Sergey,
You still need to workaround that my colleague provided, as the tap event is fired right after the hold event is completed.
Regards,
Kiril Nikolov
Telerik
You still need to workaround that my colleague provided, as the tap event is fired right after the hold event is completed.
Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0

Sergey
Top achievements
Rank 2
answered on 25 Jul 2014, 12:13 PM
Thanks for response, however it's a pity, that you need more then two years to fix such a widespread bug.