-
Notifications
You must be signed in to change notification settings - Fork 401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Touch event triggered twice on Android #48
Comments
this seems to be an issue that was present in an early version of Crafty as well: http://craftyjs.tumblr.com/post/4601812926/0-4-2-released |
Tested in Chrome and FF on a Android 4.2 tablet and it works fine, although these browsers don't seem to support the viewport tag. I think this is related to the viewport tag in some way. |
Mhh, it seems that there's a mistake in your code, I get this error message:
|
hi @yckart try the finished version of the game, it happens too and there are no errors: http://static.pablofarias.com/racinggamefinished/ |
In my Android 4.2.2 tablet the bug occurs using the native Android browser. Using Chrome and FF is not observed. So far seen in the native browser in Android 2.3, 4.1 and 4.2.2. |
I get the impression this was solved here: thatpixguy@987fb8b but somehow never nade it to the main repo |
Problem with that solution was hasTouch is true for a whole bunch of desktop browsers - which then don't trigger the mouse events. |
You are right! didn't think of those Windows 8 "yoga" tablets :) |
It seems the issue is on the old Android browser only, at least it's not present on Android Chrome or FF and people who published to Android using Cordova haven't reported this issue. New Android devices come with Chrome as the default browser so this issue is no longer present on those. I don't like the idea to make a tweak for a particular browser that's not even used in newer devices. If we did something like this (#39 (comment)), developers who want to support this browser could easily turn mouse events off when on it. |
Touch event on mobile is being triggered twice on Android. To test click on any of the numbers (tested on Android 4.1 browser), it will show the number twice:
http://static.pablofarias.com/racinggame2/
May have to do with the way I'm using the viewport. What I want to achieve is to fit to width of the device without showing more of the game world. Using maximize: "touch" shows a blank screen on my phone, using maximize: true, messes up the alignment of the GUI and the background (the link above only has the GUI. I'll be releasing the full game once finished in a blog post).
(basically I just want to re-scale the entire game to fit the screen, the way it happens in LimeJS for instance, without showing extra parts of the level)
The text was updated successfully, but these errors were encountered: