mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-17 11:01:06 +00:00
prefer explicit transition even when the url is popped of the stack Fixes #627
This commit is contained in:
parent
9e21bb9924
commit
67aed1320b
1 changed files with 10 additions and 3 deletions
|
|
@ -148,8 +148,9 @@
|
|||
type = 'get',
|
||||
isFormRequest = false,
|
||||
duplicateCachedPage = null,
|
||||
back = (back !== undefined) ? back : ( urlStack.length > 1 && urlStack[ urlStack.length - 2 ].url === url ),
|
||||
transition = (transition !== undefined) ? transition : $.mobile.defaultTransition;
|
||||
back = (back !== undefined) ? back : ( urlStack.length > 1 && urlStack[ urlStack.length - 2 ].url === url );
|
||||
//,
|
||||
//transition = (transition !== undefined) ? transition : $.mobile.defaultTransition;
|
||||
|
||||
|
||||
//If we are trying to transition to the same page that we are currently on ignore the request.
|
||||
|
|
@ -182,10 +183,16 @@
|
|||
// if the new href is the same as the previous one
|
||||
if ( back ) {
|
||||
var pop = urlStack.pop();
|
||||
if( pop ){
|
||||
|
||||
// prefer the explicitly set transition
|
||||
if( pop && !transition ){
|
||||
transition = pop.transition;
|
||||
}
|
||||
} else {
|
||||
// if no transition passed set the default
|
||||
transition = transition || $.mobile.defaultTransition;
|
||||
|
||||
// push the url and transition onto the stack
|
||||
urlStack.push({ url: url, transition: transition });
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue