Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
172
rated 0 times [  177] [ 5]  / answers: 1 / hits: 7905  / 4 Years ago, wed, july 22, 2020, 12:00:00

Im building a web app and I want to disable the zoom with 2 fingers. I have tried this



meta name="viewport" content=" width=device-width, initial-scale=1,
maximum-scale=1, user-scalable=0"



but is not working.
The app will run on tablets.


Thank you !


More From » reactjs

 Answers
4

With the React-Helmet you can put your metadata in the render-function of your Component like this:


render(){ 
return <div>
<Helmet>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
</Helmet>
[...]
</div>
}

Look at the Helmet documentation for further information.


[#3112] Saturday, July 18, 2020, 4 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
rocioblancac

Total Points: 699
Total Questions: 96
Total Answers: 108

Location: Libya
Member since Mon, Dec 7, 2020
4 Years ago
;