Reputation: 3089
Does anyone know how to disable touch gestures using JavaScript while running content in the browser on Android?
For example, I want to disable the pinch to zoom gesture via JavaScript.
Upvotes: 1
Views: 2793
Reputation: 3780
That can be done with the meta tag, viewport.
<meta name="viewport" content="width=device-width, user-scalable=no" />
I'm not sure if it's possible with JavaScript.
Upvotes: 3
Reputation: 4530
To add it with JavaScript:
var vp = document.createElement('meta');
vp.name = "viewport";
vp.content = "width=device-width; user-scalable=no;";
document.getElementsByTagName('head')[0].appendChild( vp );
Upvotes: 1