Skip to content

Commit cb71c7c

Browse files
author
Gabriel Schulhof
committed
[popup] Correctly handle the case when the fallback transition is "none" -- Fixes jquery-archive#5189
1 parent f017598 commit cb71c7c

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

js/widgets/popup.js

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,9 @@ define( [ "jquery",
279279
this._ui.container.removeClass( this._fallbackTransition );
280280
if ( value && value !== "none" ) {
281281
this._fallbackTransition = $.mobile._maybeDegradeTransition( value );
282+
if ( this._fallbackTransition === "none" ) {
283+
this._fallbackTransition = "";
284+
}
282285
this._ui.container.addClass( this._fallbackTransition );
283286
}
284287
},
@@ -447,7 +450,7 @@ define( [ "jquery",
447450

448451
_animate: function( args ) {
449452
// NOTE before removing the default animation of the screen
450-
// this had an animate callback that would relove the deferred
453+
// this had an animate callback that would resolve the deferred
451454
// now the deferred is resolved immediately
452455
// TODO remove the dependency on the screen deferred
453456
this._ui.screen
@@ -460,14 +463,16 @@ define( [ "jquery",
460463
if ( args.applyTransition ) {
461464
this._applyTransition( args.transition );
462465
}
463-
this._ui.container
464-
.animationComplete( $.proxy( args.prereqs.container, "resolve" ) )
465-
.addClass( args.containerClassToAdd )
466-
.removeClass( args.classToRemove );
467-
} else {
468-
this._ui.container.removeClass( args.classToRemove );
469-
args.prereqs.container.resolve();
466+
if ( this._fallbackTransition ) {
467+
this._ui.container
468+
.animationComplete( $.proxy( args.prereqs.container, "resolve" ) )
469+
.addClass( args.containerClassToAdd )
470+
.removeClass( args.classToRemove );
471+
return;
472+
}
470473
}
474+
this._ui.container.removeClass( args.classToRemove );
475+
args.prereqs.container.resolve();
471476
},
472477

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

0 commit comments

Comments
 (0)