mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-16 22:10:25 +00:00
don't scroll at the end. scroll halfway through instead
This commit is contained in:
parent
0a267cea64
commit
c72595c462
1 changed files with 2 additions and 9 deletions
|
|
@ -5,13 +5,12 @@
|
|||
(function( $, window, undefined ) {
|
||||
|
||||
function fadeOutInTransitionHandler( name, reverse, $to, $from ) {
|
||||
|
||||
|
||||
var deferred = new $.Deferred(),
|
||||
reverseClass = reverse ? " reverse" : "",
|
||||
active = $.mobile.urlHistory.getActive(),
|
||||
touchOverflow = $.support.touchOverflow && $.mobile.touchOverflowEnabled,
|
||||
toScroll = active.lastScroll || ( touchOverflow ? 0 : $.mobile.defaultHomeScroll ),
|
||||
viewportClass = "ui-mobile-viewport-transitioning viewport-" + name,
|
||||
preTransClass = "ui-mobile-pre-transition",
|
||||
doneOut = function() {
|
||||
|
||||
|
|
@ -48,17 +47,11 @@ function fadeOutInTransitionHandler( name, reverse, $to, $from ) {
|
|||
|
||||
doneIn = function() {
|
||||
|
||||
$to
|
||||
.removeClass( "out in reverse " + name + " " + preTransClass )
|
||||
.parent().removeClass( viewportClass );
|
||||
$to.removeClass( "out in reverse " + name + " " + preTransClass );
|
||||
|
||||
$.mobile.silentScroll( toScroll );
|
||||
|
||||
deferred.resolve( name, reverse, $to, $from );
|
||||
};
|
||||
|
||||
$to.parent().addClass( viewportClass );
|
||||
|
||||
//clear page loader
|
||||
$.mobile.hidePageLoadingMsg();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue