Permalink
Browse files

patch jquery for iOS 4.1 offset fix

  • Loading branch information...
1 parent 4e80613 commit dc16c6b2ea88c91e732893162736c380bcaa8aa4 @ursetto committed Oct 30, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 chickadee-jquery.js
View
@@ -11,9 +11,10 @@ patchMobileSafariOffset(); // http://dev.jquery.com/ticket/6446
// http://gist.github.com/434145
// as of jquery 1.4.2 mobile safari reports wrong values on offset()
// bug occurs: on iPhone OS since 3.2 version (iPad)
-// on iOS since 4.0 version
+// on iOS in version 4.0 (fixed in 4.1)
function patchMobileSafariOffset() {
if (/webkit.*mobile/i.test(navigator.userAgent)
+ && /; CPU.*OS (?:3_2|4_0)/i.test(navigator.userAgent)
&& "getBoundingClientRect" in document.documentElement) {
(function ($) {
$.fn.offsetOld = $.fn.offset;

0 comments on commit dc16c6b

Please sign in to comment.