Skip to content
This repository
Browse code

Fix for issue 1461 - Tops of pages missing after dialog click in Safa…

…ri and iPhone.

- Delayed the setting of focus till *AFTER* the scroll position is restored.
  • Loading branch information...
commit 2d2e6d7741f0e4d6dff43ec4803d84b738f373a2 1 parent 1ec80bd
Kin Blas authored April 21, 2011

Showing 1 changed file with 1 addition and 2 deletions. Show diff stats Hide diff stats

  1. 3  js/jquery.mobile.navigation.js
3  js/jquery.mobile.navigation.js
@@ -458,8 +458,7 @@
458 458
 
459 459
 				//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.
460 460
 				$.mobile.silentScroll( to.jqmData( "lastScroll" ) );
461  
-
462  
-				reFocus( to );
  461
+				$(document).one("silentscroll", function(){ reFocus( to ); });
463 462
 
464 463
 				//trigger show/hide events
465 464
 				if( from ){

3 notes on commit 2d2e6d7

Sebastian Baldovino

I tried this fix but did not work for me, either Safari or iPod

duy-axiom

this actually fixes the problem. Just make sure you have to use the nightbuild of jquerymobile (not the static alpha 4 version)

Sebastian Baldovino

Yes you are totally right, I was applying the patch to the current a4.1 version. Sorry for all the noise that I have introduced.

Please sign in to comment.
Something went wrong with that request. Please try again.