Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Fixes #4340
Browse files Browse the repository at this point in the history
Conflicts:

	js/jquery.mobile.transition.js
  • Loading branch information
gseguin committed Jun 23, 2012
1 parent 80ba409 commit 8e570e3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 17 deletions.
1 change: 0 additions & 1 deletion js/jquery.mobile.navigation.js
Expand Up @@ -1274,7 +1274,6 @@ define( [
removeActiveLinkClass( true );
$activeClickedLink = $( link ).closest( ".ui-btn" ).not( ".ui-disabled" );
$activeClickedLink.addClass( $.mobile.activeBtnClass );
$( "." + $.mobile.activePageClass + " .ui-btn" ).not( link ).blur();
}
}
});
Expand Down
30 changes: 14 additions & 16 deletions js/jquery.mobile.transition.js
Expand Up @@ -25,7 +25,7 @@ var createHandler = function( sequential ){
toScroll = active.lastScroll || $.mobile.defaultHomeScroll,
screenHeight = $.mobile.getScreenHeight(),
maxTransitionOverride = $.mobile.maxTransitionWidth !== false && $( window ).width() > $.mobile.maxTransitionWidth,
none = !$.support.cssTransitions || maxTransitionOverride || !name || name === "none",
none = !$.support.cssTransitions || maxTransitionOverride || !name || name === "none" || Math.max( $( window ).scrollTop(), toScroll ) > $.mobile.getMaxScrollForTransition(),
toPreClass = " ui-page-pre-in",
toggleViewportClass = function(){
$.mobile.pageContainer.toggleClass( "ui-mobile-viewport-transitioning viewport-" + name );
Expand Down Expand Up @@ -71,14 +71,11 @@ var createHandler = function( sequential ){

startIn();
},

startIn = function(){

//prevent flickering in phonegap container
$to.css("z-index", -10);

$to.addClass( $.mobile.activePageClass + toPreClass );


startIn = function(){

$to.addClass( $.mobile.activePageClass );

// Send focus to page as it is now display: block
$.mobile.focusPage( $to );

Expand All @@ -87,16 +84,11 @@ var createHandler = function( sequential ){

scrollPage();

//restores visibility of the new page
$to.css("z-index", "");

if( !none ){
$to.animationComplete( doneIn );
}

$to
.removeClass( toPreClass )
.addClass( name + " in" + reverseClass );
$to.addClass( name + " in" + reverseClass );

if( none ){
doneIn();
Expand Down Expand Up @@ -157,7 +149,13 @@ $.mobile.transitionHandlers = {

$.mobile.transitionFallbacks = {};

$.mobile = $.extend( {}, {
getMaxScrollForTransition: function() {
return $.mobile.getScreenHeight() * 3;
}
}, $.mobile );

})( jQuery, this );
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
});
//>>excludeEnd("jqmBuildExclude");
//>>excludeEnd("jqmBuildExclude");

2 comments on commit 8e570e3

@jaspermdegroot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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

@gseguin
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.