1
votes

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 !

1

1 Answers

1
votes

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.