When a user logs into my application with an iPhone / iPad, Safari (usefully) scales when the user fills in the username and password fields. But when the form is submitted and we register it, we do not reload the page (this is a one-page application), so the scaling will never be reset. Thus, the application always starts with a scaled scale.
I reviewed Jeremy Keith's solution , which successfully rescales, but also prevents future scaling / scaling by the user as it sets the maximum-scale the viewport.
Like this:
var viewportmeta = document.querySelector('meta[name="viewport"]'); if (viewportmeta) { viewportmeta.content = 'width=device-width, minimum-scale=1.0, maximum-scale=1.0, initial-scale=1.0'; }
Has anyone seen a great reseller solution after submitting a form without freezing then in the viewport?
javascript html ios mobile-safari
Bryce johnson
source share