Search code examples
htmlioswebsafariviewport

Website loads zoomed in slightly on mobile devices despite proper viewport meta tag


Viewport meta tag is as follows:

<meta name="viewport" content="width=device-width, initial-scale=1" />

Despite this, I need to manually zoom out on iphone/ipad to fit the site to screen. There's no min-widths preventing the site from scaling down to fit, so all that I can think of is perhaps iOS Safari calculates viewport size without accounting for its vertical scrollbar? Regardless, is there anyway of forcing it to load zoomed all the way out without disabling zoom functionality throughout?


Solution

  • For anyone curious I solved it.

    Case:

    • The landing page had a login,
    • iOS would automatically focus on the inputs because the font size was lower than 16px.
    • Because it's a single page app the view remained the same.

    Solution:

    • Make sure your inputs have at least 16px font-size, else iPhone SE and such will zoom in so the text input is more visible.