Permalink
Browse files

moved the fallback transition check out of the handler and into nav.j…

…s, where it can properly route to the necessary transition handler before calling it.
  • Loading branch information...
1 parent 2a8d212 commit 2c6bfbc29b3d25856f44b8a3e2ad458940874ed9 scottjehl committed Mar 27, 2012
Showing with 7 additions and 7 deletions.
  1. +6 −1 js/jquery.mobile.navigation.js
  2. +1 −6 js/jquery.mobile.transition.js
@@ -485,7 +485,12 @@ define( [
//clear page loader
$.mobile.hidePageLoadingMsg();
-
+
+ // If transition is defined, check if css 3D transforms are supported, and if not, if a fallback is specified
+ if( transition && !$.support.cssTransform3d && $.mobile.transitionFallbacks[ transition ] ){
+ transition = $.mobile.transitionFallbacks[ transition ];
+ }
+
//find the transition handler for the specified transition. If there
//isn't one in our transitionHandlers dictionary, use the default one.
//call the handler immediately to kick-off the transition.
@@ -17,12 +17,7 @@ var createHandler = function( sequential ){
}
return function( name, reverse, $to, $from ) {
-
- // override name if there's no 3D transform support and a fallback is defined, or if not, to "none"
- if( name && !$.support.cssTransform3d && $.mobile.transitionFallbacks[ name ] ){
- name = $.mobile.transitionFallbacks[ name ];
- }
-
+
var deferred = new $.Deferred(),
reverseClass = reverse ? " reverse" : "",
active = $.mobile.urlHistory.getActive(),

0 comments on commit 2c6bfbc

Please sign in to comment.