This simple utility is used to disable user scaling in devices like iOS. The disable() method disables user-scaling. The enable() method enables user-scaling. The enabled property keeps track of state.
Two other utilites are included here as well.
First, there's zoom.iosfocusfix.js, which disables zoom as a select or input element is focused, preventing iOS from zooming into that element and cropping the viewport. Zoom is restored just after the focus event fires (a half second timeout).
Then there's zoom.iosorientationfix.js, which is intended to fix the iOS orientationchange zoom bug, following the approach from this project https://github.com/scottjehl/iOS-Orientationchange-Fix. This may not be working yet. Needs testing, and it may require that we change the values of the meta content to use maximum-scale instead of user-scalable.
Lastly, fixedtoolbar, once it lands, should use this utility to disable/enable zoom, rather than the one that's currently included in its own source.
Function accepts a Y positioning argument, or defaults to 0 if undefined.
Now page transitions cache their previous scroll position when leaving, and that position will be remembered when revisting that page.
This change also includes a fix for webOS to use this new feature and set the previous scroll to the location of the clicked selectmenu (so after using the select, it'll scroll back to its location, even though webOS doesn't support scrolltop)
Fixes#355
- metaViewportContent: "width=device-width, minimum-scale=1, maximum-scale=1",
- headExtras: undefined
If metaViewportContent is undefined, no viewport meta tag will be added to the dom.
headExtras is undefined by default, but allows for additional markup to be injected into the head element, such as meta tags used for enabling iOS local app features
Also, the <base> tag is defined as $base (undefined if support test is false), so setting its value no longer uses an ID selector to find it.