question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Click/Touch doesn't work on mobile via PhoneGap with 0.7.1, works with 0.4.2

See original GitHub issue

Hi,

I crafted a very, very simple minimal CraftyJS game – something like (minus boiler-plate code):

Crafty.e('2D, Alpha, Color, Canvas, Mouse, Touch').attr({ "w": 48, "h": 48 }).bind('Click', function() { Crafty.audio.play(someId) });

I tried swapping Click with Touch. It works fine on the web, but when I shove it into a PhoneGap container and deploy it on my phone (OnePlus X), the click handler never fires. I even added a “.color('blue”)` to make sure that it’s not just that audio’s broken on my phone.

Is this something that’s supposed to work, or is it something that’s not supported?

I’m using CraftyJS 0.7.1 with PhoneGap 6.3.0 (I think)

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:17 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
ashes999commented, May 10, 2017

After lots of hoopla related to network access, I can confirm that the touch event works as expected on my device.

I noticed that in both web (Chrome from desktop) and on my device, I have to (after the first click) click the square several times to get it to toggle – but the first click always changes it from green to blue.

You can close this issue or leave it open as per your processes. As far as I’m concerned, problem solved!

1reaction
ashes999commented, May 10, 2017

Sorry, it was always my intention to test this on my real device; I just didn’t get time yet. It’s my intention to get to this by the end of the week.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PhoneGap does not stop loading · Issue #913 - GitHub
Was having the same issue with Windows 10 (x64), but I got it working by doing the following: Installed the desktop app using...
Read more >
Phonegap build app does not work properly on android
I develop application using cordova and Phonegap Build to get web, iOS and Android versions. iOS version works just fine, but Android's one...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found