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:
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
but I can’t seem to find a solution on the internet (except for the
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
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