From 2d5db1cba5ecc826f69099047ec5cdad8b5c378b Mon Sep 17 00:00:00 2001 From: Vadim Gerassimov Date: Thu, 4 Oct 2012 15:59:45 +0300 Subject: [PATCH] iscroll is refreshed on page show, fixes the iOS6 bug --- lib/jquery.mobile.iscrollview.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/jquery.mobile.iscrollview.js b/lib/jquery.mobile.iscrollview.js index b179ce3..b22dce4 100644 --- a/lib/jquery.mobile.iscrollview.js +++ b/lib/jquery.mobile.iscrollview.js @@ -1423,6 +1423,7 @@ dependency: iScroll 4.1.9 https://github.com/cubiq/iscroll or later (4.2 provid _create_iscroll_object: function() { /*jslint newcap:true */ this.iscroll = new IScroll(this, this.$wrapper.get(0), this._create_iscroll_options()); + window.iscroll = this.iscroll; /* jslint newcap:false */ }, @@ -1849,7 +1850,11 @@ jQuery(document).bind("pagecreate", function (e) { // _create() function for each member of the array. // If the array is of zero length, then no _create() fucntion is called. var elements = jQuery(e.target).find(":jqmData(iscroll)"); - elements.iscrollview(); - }); + elements.iscrollview(); +}); + +jQuery(document).live('pageshow', function(e) { + if (window.iscroll) window.iscroll.refresh(); +});