Prevent input zoom on iphone

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Prevent input zoom on iphone

This topic contains 2 replies, has 2 voices, and was last updated by ajmartin ajmartin 6 years, 8 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #6214
    ajmartin
    ajmartin
    Participant

    do you have an option or do you know how to prevent the input zoom on iphone?

    #6215
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    It’s an IOS feature, and it’s not preventable unfortunately. There are two ways to get around it globally.

    1. Setting the input font size over 16 pixels. The mobile safari then will decide not to zoom in, as it’s sufficiently big. (plugin Theme Options -> Input Field Layout -> Search input font option)

    2. Using a no-scale meta tag in your site header. You can try putting this meta tag to your site header.php file:

    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />

    There is no Javascript or any other programmatical way of preventing it yet.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #6216
    ajmartin
    ajmartin
    Participant

    awesome thanks!! – it has taken me some time to get this thing to work right but this is a FANTASTIC plugin

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.