[Support request] Preventing mobile zoom in form fields, etc.

Home Forums Support Preventing mobile zoom in form fields, etc.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1409767
    Craig

    Hi GP Support –

    I am trying to prevent any zooming when a user clicks into a form field.

    I’ve set up an element Hook (wp-head) and set it to Display Entire Site.

    I’ve put this into the Hook:

    <meta name=”viewport” content=”width=device-width, initial-scale=1, maximum-scale=1,user-scalable=0″/>

    Is this right/correct? Seems to work, just not sure if I am causing damage elsewhere?

    Thanks so much!

    #1410097
    Tom
    Lead Developer
    Lead Developer

    That works, but it would be better to filter the one that GP adds so you don’t have both:

    add_filter( 'generate_meta_viewport', function() {
        return '<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1,user-scalable=0" />';
    } );
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.