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

Swipe Events - undocumented and causing trouble

1 Answer 67 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Aaron
Top achievements
Rank 1
Aaron asked on 18 May 2012, 06:59 PM
It appears that when I include kendo.web.min.js in my project, it registers several events to pretty much every object on the page.

e(["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap"]

This doesn't seem to affect desktops, but on my iPad it prevents me from registering my own .swipe handler using jQuery.

If I write out the function that is bound on the ipad only I get:

function(a) { return this.bind(c,a);}


On the desktop, i get whatever function I assigned to .swipe / etc.


It would seem to be that Swipe events need to officially documented OR they need to not be bound to everything.

Please don't just reply and say "look @ the drag & drop API because it uses this stuff internally".  I know it does and I don't see swipe documented there.


Thanks! 

1 Answer, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 19 May 2012, 07:32 AM
Hi,

 The non-minified version of the code you mention looks like this:

each(["swipe", "swipeLeft", "swipeRight", "swipeUp", "swipeDown", "doubleTap", "tap"], function(m, value) {
          $.fn[value] = function(callback) {
               return this.bind(value, callback);
           };
       });

What it does is to expose shortcuts to the listed events. Just like jQuery has $.fn.click as a convenience alias for $.fn.bind("click")

This code is not used by the kendo widgets (nor by the drag and drop API). You can either include the library which provides different swipe event implementation after the kendo script, or modify the source code (I assume you use the GPL version) and remove it. 

Greetings,
Petyo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
General Discussions
Asked by
Aaron
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Share this question
or