Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by sleenee

hello people,

The following issue occurs to my game when played on mobile: if the player taps the canvas at the same spot twice in quick succession (double-tapping) , he automatically zooms in. This is totally unwanted behavior of course and I had it on the HTC desire, OS: android. Though I did not saw it happening on ipad for some reason.

Dominic already avoids user-scalability in his index-mobile.html file for biodisaster by using:
<meta name="viewport" content="width=device-width; initial-scale=1; maximum-scale=1; user-scalable=no;"/>

So the user-scalable=no; or user-scalable=0; is the relevant part here and I used that too.
This part avoids a touch-move to zoom in
document.body.addEventListener('touchmove', function(e) { e.preventDefault(); window.scrollTo(0,1); }, false);

but I can’t seem to find a solution on the internet (except for the
 user-scalable=no;

which doesn’t do the trick) to avoid double-tappers from zooming in.

Some of you surely must have ran into this issue already, is there a statement that can avoid double-tapping from zooming in on a mobile device?

thanks in advance,

Sleenee

1 decade ago by korzen303

Hi,
I am having exactly the same problem on Nexus 7 (Android 4.1) and Chrome. Did anyone find a solution to this issue?
Cheers
Page 1 of 1
« first « previous next › last »