Permalink
Browse files

Fixed #2699 - Dialog reverse transition

- Moved the settings.transition calculation code before the code that pushes a new history item on the stack. This ensures that the proper transition is stored with the history item.
  • Loading branch information...
jblas committed Oct 14, 2011
1 parent 832d237 commit ab8deade90a9123fe7371e9273babc8d6a48defe
Showing with 5 additions and 5 deletions.
  1. +5 −5 js/jquery.mobile.navigation.js
@@ -1103,6 +1103,11 @@
pageTitle = newPageTitle;
}
+ // Make sure we have a transition defined.
+ settings.transition = settings.transition
+ || ( ( historyDir && !activeIsInitialPage ) ? active.transition : undefined )
+ || ( isDialog ? $.mobile.defaultDialogTransition : $.mobile.defaultPageTransition );
+
//add page to history stack if it's not back or forward
if( !historyDir ) {
urlHistory.addNew( url, settings.transition, pageTitle, pageUrl, settings.role );
@@ -1114,11 +1119,6 @@
//set "toPage" as activePage
$.mobile.activePage = toPage;
- // Make sure we have a transition defined.
- settings.transition = settings.transition
- || ( ( historyDir && !activeIsInitialPage ) ? active.transition : undefined )
- || ( isDialog ? $.mobile.defaultDialogTransition : $.mobile.defaultPageTransition );
-
// If we're navigating back in the URL history, set reverse accordingly.
settings.reverse = settings.reverse || historyDir < 0;

0 comments on commit ab8dead

Please sign in to comment.