Fix #14318: Cherry-pick interrupted animation fix from master ea5c22ec12

This commit is contained in:
Richard Gibson
2013-08-30 12:38:43 -04:00
parent 8e6e239256
commit 5cd6868365
2 changed files with 19 additions and 8 deletions

8
src/effects.js vendored
View File

@@ -337,7 +337,13 @@ function defaultPrefilter( elem, props, opts ) {
delete props[ prop ];
toggle = toggle || value === "toggle";
if ( value === ( hidden ? "hide" : "show" ) ) {
continue;
// If there is dataShow left over from a stopped hide or show and we are going to proceed with show, we should pretend to be hidden
if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
hidden = true;
} else {
continue;
}
}
orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
}