From f5260ab9e51b83fd371358d96d65dc697242f0bb Mon Sep 17 00:00:00 2001 From: scottjehl Date: Wed, 25 Jan 2012 17:24:53 +0700 Subject: [PATCH] exclude non-iOS platforms from this behavior --- js/jquery.mobile.zoom.iosorientationfix.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/jquery.mobile.zoom.iosorientationfix.js b/js/jquery.mobile.zoom.iosorientationfix.js index 69c47881..b7fcb499 100644 --- a/js/jquery.mobile.zoom.iosorientationfix.js +++ b/js/jquery.mobile.zoom.iosorientationfix.js @@ -5,6 +5,12 @@ define( [ "jquery", "jquery.mobile.core", "jquery.mobile.zoom" ], function( $ ) { //>>excludeEnd("jqmBuildExclude"); ( function( $, window ) { + + // This fix addresses an iOS bug, so return early if the UA claims it's something else. + if( !(/iPhone|iPad|iPod/.test( navigator.platform ) && navigator.userAgent.indexOf( "AppleWebKit" ) > -1 ) ){ + return; + } + var zoom = $.mobile.zoom, evt, x, y, z, aig;