Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[popup] Correctly handle the case when the fallback transition is "no…

…ne" -- Fixes #5189
  • Loading branch information...
commit 42fc564383b22240f30d6b4ec36f617449904891 1 parent 997dbb2
@gabrielschulhof gabrielschulhof authored
Showing with 13 additions and 8 deletions.
  1. +13 −8 js/widgets/popup.js
View
21 js/widgets/popup.js
@@ -265,6 +265,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 );
}
},
@@ -433,7 +436,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
@@ -446,14 +449,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
Please sign in to comment.
Something went wrong with that request. Please try again.