Commit graph

9 commits

Author SHA1 Message Date
scottjehl
99db3d039f Merge remote branch 'origin/master' 2012-01-25 18:26:57 +07:00
scottjehl
f5260ab9e5 exclude non-iOS platforms from this behavior 2012-01-25 17:24:53 +07:00
jrburke
096e90bbfe Update to relative AMD dependencies, allows proper use of source in an AMD project. 2012-01-24 14:43:24 -08:00
scottjehl
6e12e62123 namespaced the events. 2012-01-24 17:31:07 +07:00
scottjehl
edad9c1f9a window not w, evt wasn't defined. Thanks @staabm 2012-01-24 17:31:06 +07:00
scottjehl
5725b4bac9 updated to bulletproof further 2012-01-24 17:31:06 +07:00
scottjehl
6cee30d22c updated to use only the devicemotion event, for compatibility and less battery battering 2012-01-24 17:31:06 +07:00
scottjehl
460ad7197c This change brings the iOS orientationchange bug workaround up to the latest code from that external project, with an experimental attempt at iOS4.3 support on the 3GS using the devicemotion event, which may be a bad idea to use unthrottled - not sure yet. This code needs to be tested on a device with iOS5, and I imagine the check for deviceorientation will also need a check for the value of evt.gamma. At that point, we may decide to only support iOS5 for this workaround, and the code can bind only to deviceorientation and be more concise. 2012-01-24 17:31:06 +07:00
scottjehl
66be09d2de A new utility: $.mobile.zoom, which as 3 members: enabled [bool], disable [function], and enable [function].
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.
2012-01-24 17:31:05 +07:00