Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    BUG : Ghost Clicks in iPad

    Be sure your post includes:

    1. VERSION SmartGWT 3.1p SmartClient Version v8.2p_2012-06-10

    2. ENVIRONMENT : iPad 3 - iOS5 - Mobile Safari

    3. PROBLEM :

    On iPad, ghost clicks are observed. I've looked at the SmartClient code and it tries to handle "touchStart" event instead of the normal "mousedown" event for touch devices. The problem is that once the "touchStart" is handled by SmartGWT, the native "mousedown" will fire elsewhere creating ghost clicks. If I have a MenuItem and click that MenuItem, then "touchStart" handled by SmartGWT will dismiss the menu, but the native "mouseDown" will hit the widgets underneath the menu, creating ghost clicks. This affects almost every widgets.

    4. SOLUTION :

    At EventHandler.js function "_handleTouchStart" line 2594, instead of simply processing the touch start event, we have to add DOMevent.preventDefault() and DOMevent.stopPropagation() and DOMevent.stopImmediatePropagation() to prevent the native "mousedown" from being fired again, and thus preventing the ghost clicks

    5. REFERENCE

    For a more complete solution, the page here is very good on solving this issue :
    https://developers.google.com/mobile..._buttons#ghost
    http://cubiq.org/remove-onclick-dela...kit-for-iphone

    Thanks
    Last edited by har28; 10 Jun 2012, 19:48.

    #2
    Hm no one else encountered this? Those working with iPads will certainly see the ghost clicks everywhere. It may seem that the user "accidentally" triggers the touch event, but this is certainly a SmartGWT bug.

    Comment

    Working...
    X