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

Commit

Permalink
[popup] Correctly handle the case when the fallback transition is "no…
Browse files Browse the repository at this point in the history
…ne" -- Fixes #5189
  • Loading branch information
Gabriel Schulhof committed Oct 25, 2012
1 parent f017598 commit cb71c7c
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions js/widgets/popup.js
Expand Up @@ -279,6 +279,9 @@ define( [ "jquery",
this._ui.container.removeClass( this._fallbackTransition );
if ( value && value !== "none" ) {
this._fallbackTransition = $.mobile._maybeDegradeTransition( value );
if ( this._fallbackTransition === "none" ) {
this._fallbackTransition = "";
}
this._ui.container.addClass( this._fallbackTransition );
}
},
Expand Down Expand Up @@ -447,7 +450,7 @@ define( [ "jquery",

_animate: function( args ) {
// NOTE before removing the default animation of the screen
// this had an animate callback that would relove the deferred
// this had an animate callback that would resolve the deferred
// now the deferred is resolved immediately
// TODO remove the dependency on the screen deferred
this._ui.screen
Expand All @@ -460,14 +463,16 @@ define( [ "jquery",
if ( args.applyTransition ) {
this._applyTransition( args.transition );
}
this._ui.container
.animationComplete( $.proxy( args.prereqs.container, "resolve" ) )
.addClass( args.containerClassToAdd )
.removeClass( args.classToRemove );
} else {
this._ui.container.removeClass( args.classToRemove );
args.prereqs.container.resolve();
if ( this._fallbackTransition ) {
this._ui.container
.animationComplete( $.proxy( args.prereqs.container, "resolve" ) )
.addClass( args.containerClassToAdd )
.removeClass( args.classToRemove );
return;
}
}
this._ui.container.removeClass( args.classToRemove );
args.prereqs.container.resolve();
},

// The desired coordinates passed in will be returned untouched if no reference element can be identified via
Expand Down

0 comments on commit cb71c7c

Please sign in to comment.