Skip to content

Commit 80d1ebc

Browse files
author
Ralph Holzmann
committed
#5157 Bug Fix
1 parent 4151dde commit 80d1ebc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/effects.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ jQuery.fx.prototype = {
293293
(jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );
294294

295295
// Set display property to block for height/width animations
296-
if ( ( this.prop === "height" || this.prop === "width" ) && this.elem.style ) {
296+
if ( ( this.prop === "height" || this.prop === "width" ) && this.elem.style && jQuery.fx.tableTag.test(this.elem.tagName)) {
297297
this.elem.style.display = "block";
298298
}
299299
},
@@ -460,7 +460,11 @@ jQuery.extend( jQuery.fx, {
460460
fx.elem[ fx.prop ] = fx.now;
461461
}
462462
}
463-
}
463+
},
464+
465+
// Regex used to maintain the display property of animated table elements
466+
tableTag: new RegExp("/(TABLE|TR|TD|TH|THEAD|TBODY|TFOOT)/")
467+
464468
});
465469

466470
if ( jQuery.expr && jQuery.expr.filters ) {

0 commit comments

Comments
 (0)