Android Touch Events

4 posts, 0 answers
  1. David
    David avatar
    60 posts
    Member since:
    Nov 2012

    Posted 09 May 2013 Link to this post

    I have a mobile app built with icenium and using kendo ui for the styling.  I have noticed on android that touch events seem to behave strangely, I am linking 2 videos to demonstrate the problem in case my description here is not sufficient.

    When an action sheet on android has an action that is located above a control with a click handler, the click event is fired.  In this video I show this happening, first I touch a phone link to show that it launches the dialer, then I log into the application and open the 'options' action sheet.  When I touch the 'logout' option the app navigates back to the login page which contains the phone link and because the 'logout' action is over the phone link the phone link gets touched and the dialer launches.

    The second video shows another issue where touching a link will trigger the touch event of a control on the page that is linked.  I first touch a link to another page in my app on the left side of the screen, there everything seems to work normally.  After that I touch the link again but on the right side when the page navigates it activates the text field on the form of the second page as if it had recieved the touch action.

    Is there a work around to fix this behavior?  It works fine on iOS devices I have only noticed it on android ones.
  2. Petyo
    Admin
    Petyo avatar
    2444 posts

    Posted 13 May 2013 Link to this post

    Hi David,

    As you have correctly noticed, Android has horribly broken implementation of the mouse events simulation.  What happens in your case is that the next view receives the "click" simulated DOM event from the previous touches. Apple resolves that by not triggering those events if the DOM mutates, but Android did not implement this.

    A viable workaround I may suggest is to use a button widget instead of the link and do something like "location.href = '' " in its click handler. 

    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!
  3. David
    David avatar
    60 posts
    Member since:
    Nov 2012

    Posted 14 May 2013 Link to this post

    Thanks for the info Petyo, do you happen to know if there are plans in the kendo roadmap to handle this or will there always be a need to work around this in Android?
  4. Petyo
    Admin
    Petyo avatar
    2444 posts

    Posted 16 May 2013 Link to this post

    Hello David,

    There were several attempts to resolve that behavior in some of our previous releases - unfortunately the fixes broke other features (like focusing form elements, for example). Given the current Android fragmentation state, we don't plan on giving this another try anytime soon. 

    I am sorry for the inconvenience caused.

    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!
Back to Top