Swipe Events - undocumented and causing trouble

2 posts, 0 answers
  1. Aaron
    Aaron avatar
    1 posts
    Member since:
    May 2012

    Posted 18 May 2012 Link to this post

    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.


    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.

  2. Petyo
    Petyo avatar
    2444 posts

    Posted 19 May 2012 Link to this post


     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. 

    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top