From 2d2e6d7741f0e4d6dff43ec4803d84b738f373a2 Mon Sep 17 00:00:00 2001 From: Kin Blas Date: Thu, 21 Apr 2011 15:31:21 -0700 Subject: [PATCH] Fix for issue 1461 - Tops of pages missing after dialog click in Safari and iPhone. - Delayed the setting of focus till *AFTER* the scroll position is restored. --- js/jquery.mobile.navigation.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index d3799ddf..f2567df6 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -458,8 +458,7 @@ //jump to top or prev scroll, sometimes on iOS the page has not rendered yet. I could only get by this with a setTimeout, but would like to avoid that. $.mobile.silentScroll( to.jqmData( "lastScroll" ) ); - - reFocus( to ); + $(document).one("silentscroll", function(){ reFocus( to ); }); //trigger show/hide events if( from ){