On Touched Object Event Fires Twice on Android via Crosswalk

0 favourites
  • 6 posts
From the Asset Store
Forget about default textbox restrictions, you can create sprites atop of the textbox
  • Problem Description

    On Chrome on Windows, On Touched Object fires Once.

    When exporting the project to Android via Crosswalk and opening in XDK or opening the APK on Android, the On Touched Object event fires twice.

    Attach a Capx

    https://dl.dropboxusercontent.com/u/614 ... h_bug.capx

    Description of Capx

    There is one layout with one sprite, and one event in the event sheet.

    When the sprite is touched, the browser displays an alert.

    Once on Windows, twice on Android.

    Steps to Reproduce Bug

    • Open the capx in Construct 2
    • Run the project
    • Click the sprite
    • See that there's one alert displayed
    • Create project in Intel XDK and Export to Android via Crosswalk
    • Emulate in XDK or build the APK and install it on Android
    • Touch the sprite again on Android, either in XDK or on actual device

    Observed Result

    Browser displays TWO alerts.

    Expected Result

    Browser displays ONE alert, just like on Windows and just like I would expect it to, because I only touched once.

    Affected Browsers

    • Chrome: (Only in Android via Crosswalk)
    • FireFox: (NO)
    • Internet Explorer: (NO)

    Operating System and Service Pack

    Intel XDK 0505 (I think, not sure where to look, I believe it's the latest).

    My Android phone, Android 4.1.1

    Construct 2 Version ID

    Release 158.2 64 bit

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I am having the same problem.

  • In the Touch object, select mouse input to Off and give it another go. Certainly with phonegap you get double triggers if the mouse input is enabled and I suspect it's the same here as well (I haven't the time to test it through to completion using the xdk). I only use the mouse input for debugging on my computer....

  • Thanks Colludium, turning mouse input off on the touch object fixes it.

    I still think it's a bug , and there's a slight inconvenience to remember turning it on and off all the time (when testing on the desktop vs the device) but the workaround does work, so that probably makes it a lower priority bug.

    Cheers!

  • You should not use 'alert' to test things like this: some browsers have bugs in the alert dialogs that can cause events to mis-fire or switch focus in unexpected ways. Please repost a repro .capx which does not use alert.

  • Thanks Ashley.

    I only used alerts in the small demo I made to repro the bug. In my real project I don't use alerts, and it still gets fired twice, that's how I found the bug.

    Cheers!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)