Stops the zoom of iOS into a focused text field (a search field, a Tweakpane text field), which does not zoom back out
when the field loses the focus. It adds maximum-scale=1 to the viewport meta tag of the page (a new tag when the page
has none). Safari ignores it for a pinch zoom, so the person can still zoom the page with two fingers; an in-app
browser (WKWebView) or a web app on the home screen follows it and blocks the pinch zoom.
On other systems it does nothing: they do not zoom into a field, and an Android browser would block the pinch zoom.
Parameters
doc: Document = document
the document of the page
nav: Navigator = navigator
the navigator, for the system
Returns ()=>void
a function that puts the viewport tag back as it was
Stops the zoom of iOS into a focused text field (a search field, a Tweakpane text field), which does not zoom back out when the field loses the focus. It adds
maximum-scale=1to the viewport meta tag of the page (a new tag when the page has none). Safari ignores it for a pinch zoom, so the person can still zoom the page with two fingers; an in-app browser (WKWebView) or a web app on the home screen follows it and blocks the pinch zoom.On other systems it does nothing: they do not zoom into a field, and an Android browser would block the pinch zoom.