touch/click event propagated to new view in app.navigate()

2 posts, 0 answers
  1. Ron
    Ron avatar
    122 posts
    Member since:
    Sep 2011

    Posted 14 Apr 2014 Link to this post

    In our App, we see that sometimes, a call from a click event (via touch on the device) is propagated to the new view that we navigate to.

    For example, assume that we have a list with multiple entries, each one taking us to a different view - we see that in some cases, when tapping the item and performing the navigation, the button/element (in the new view) that is under where the finger was in the original (pre-navigation) item is clicked after the navigation.

    This seems to be solved with some combination of setTimeOut(function() { app.navigate(target) }, X) - 

    on iOS7 with an iPhone 5S X == 0 works, but for an older Nexus phone, we need to set X == 20 to work.

    Obviously, this is a hack, and seems like a bug that really should not happen.

    Is there a way to eliminate it via a Kendo option or something? Is it related to the 300ms delay between touch and click events?

  2. Petyo
    Petyo avatar
    2436 posts

    Posted 16 Apr 2014 Link to this post

    Hi Ron,

    As you have correctly guessed, the problem is related to the touch/click events delay. In general, the workaround you have mentioned is not needed in iOS. According to their specification, the click event will not occur if the DOM changes in the touch event. Unfortunately, this implementation is broken in older Android devices. 

    At this point, we can't suggest anything apart from the workaround you have already discovered. 

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