Skip to content
This repository
Browse code

Fixes #4340

Conflicts:

	js/jquery.mobile.transition.js
  • Loading branch information...
commit 8e570e3f94846d6e01e3bf03da284db3c402979b 1 parent 80ba409
Ghislain Seguin authored June 22, 2012
1  js/jquery.mobile.navigation.js
@@ -1274,7 +1274,6 @@ define( [
1274 1274
 					removeActiveLinkClass( true );
1275 1275
 					$activeClickedLink = $( link ).closest( ".ui-btn" ).not( ".ui-disabled" );
1276 1276
 					$activeClickedLink.addClass( $.mobile.activeBtnClass );
1277  
-					$( "." + $.mobile.activePageClass + " .ui-btn" ).not( link ).blur();
1278 1277
 				}
1279 1278
 			}
1280 1279
 		});
30  js/jquery.mobile.transition.js
@@ -25,7 +25,7 @@ var createHandler = function( sequential ){
25 25
 			toScroll = active.lastScroll || $.mobile.defaultHomeScroll,
26 26
 			screenHeight = $.mobile.getScreenHeight(),
27 27
 			maxTransitionOverride = $.mobile.maxTransitionWidth !== false && $( window ).width() > $.mobile.maxTransitionWidth,
28  
-			none = !$.support.cssTransitions || maxTransitionOverride || !name || name === "none",
  28
+			none = !$.support.cssTransitions || maxTransitionOverride || !name || name === "none" || Math.max( $( window ).scrollTop(), toScroll ) > $.mobile.getMaxScrollForTransition(),
29 29
 			toPreClass = " ui-page-pre-in",
30 30
 			toggleViewportClass = function(){
31 31
 				$.mobile.pageContainer.toggleClass( "ui-mobile-viewport-transitioning viewport-" + name );
@@ -71,14 +71,11 @@ var createHandler = function( sequential ){
71 71
 				
72 72
 				startIn();
73 73
 			},
74  
-
75  
-			startIn = function(){
76  
-
77  
-				//prevent flickering in phonegap container
78  
-				$to.css("z-index", -10);
79  
-
80  
-				$to.addClass( $.mobile.activePageClass + toPreClass );
81  
-
  74
+			
  75
+			startIn = function(){	
  76
+			
  77
+				$to.addClass( $.mobile.activePageClass );				
  78
+			
82 79
 				// Send focus to page as it is now display: block
83 80
 				$.mobile.focusPage( $to );
84 81
 
@@ -87,16 +84,11 @@ var createHandler = function( sequential ){
87 84
 				
88 85
 				scrollPage();
89 86
 				
90  
-				//restores visibility of the new page
91  
-				$to.css("z-index", "");
92  
-
93 87
 				if( !none ){
94 88
 					$to.animationComplete( doneIn );
95 89
 				}
96 90
 				
97  
-				$to
98  
-					.removeClass( toPreClass )
99  
-					.addClass( name + " in" + reverseClass );
  91
+				$to.addClass( name + " in" + reverseClass );
100 92
 				
101 93
 				if( none ){
102 94
 					doneIn();
@@ -157,7 +149,13 @@ $.mobile.transitionHandlers = {
157 149
 
158 150
 $.mobile.transitionFallbacks = {};
159 151
 
  152
+$.mobile = $.extend( {}, {
  153
+	getMaxScrollForTransition:  function() {
  154
+		return $.mobile.getScreenHeight() * 3;
  155
+	}
  156
+}, $.mobile );
  157
+
160 158
 })( jQuery, this );
161 159
 //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
162 160
 });
163  
-//>>excludeEnd("jqmBuildExclude");
  161
+//>>excludeEnd("jqmBuildExclude");

2 notes on commit 8e570e3

Jasper de Groot
Owner

@gseguin

Are toPreClass and css("z-index", -10) removed on purpose here (1.1-stable)? On master they are still in.

BTW - The variable toPreClass and the CSS for ui-page-pre-in are still in the 1.1-stable code

Edit: the reason why I ask is this: d89a919#commitcomment-1591911

Ghislain Seguin
Collaborator

I don't think that was on purpose. I don't understand why that commit includes more changes than 8e570e3#L1R28

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