Skip to content
This repository
Browse code

This works around an issue where iOS5 and maybe others fail to scroll…

… to the desired location during a transition that uses 3D transforms.
  • Loading branch information...
commit 7a05b385b4b9886581c0d62ca9df94a7a9f5fea2 1 parent e7f9a41
authored

Showing 1 changed file with 7 additions and 1 deletion. Show diff stats Hide diff stats

  1. 8  js/jquery.mobile.transition.js
8  js/jquery.mobile.transition.js
@@ -76,7 +76,13 @@ var createHandler = function( sequential ){
76 76
 					.removeClass( "out in reverse " + name )
77 77
 					.height( "" );
78 78
 				
79  
-				toggleViewportClass();	
  79
+				toggleViewportClass();
  80
+				
  81
+				// In some browsers (iOS5), 3D transitions block the ability to scroll to the desired location during transition
  82
+				// This ensures we jump to that spot after the fact, if we aren't there already.
  83
+				if( $( window ).scrollTop() !== toScroll ){
  84
+					$.mobile.silentScroll( toScroll );
  85
+				}
80 86
 
81 87
 				deferred.resolve( name, reverse, $to, $from, true );
82 88
 			};

0 notes on commit 7a05b38

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