File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,7 @@ jQuery.fn.extend({
133133 if ( ( p === "height" || p === "width" ) && this . style ) {
134134 // Store display property
135135 opt . display = jQuery . css ( this , "display" ) ;
136+ opt . protectDisplay = jQuery . fx . protect . test ( this . tagName ) ;
136137
137138 // Make sure that nothing sneaks out
138139 opt . overflow = this . style . overflow ;
@@ -293,7 +294,7 @@ jQuery.fx.prototype = {
293294 ( jQuery . fx . step [ this . prop ] || jQuery . fx . step . _default ) ( this ) ;
294295
295296 // Set display property to block for height/width animations
296- if ( ( this . prop === "height" || this . prop === "width" ) && this . elem . style && jQuery . fx . tableTag . test ( this . elem . tagName ) ) {
297+ if ( ( this . prop === "height" || this . prop === "width" ) && this . elem . style && ! this . options . protectDisplay ) {
297298 this . elem . style . display = "block" ;
298299 }
299300 } ,
@@ -461,9 +462,8 @@ jQuery.extend( jQuery.fx, {
461462 }
462463 }
463464 } ,
464-
465- // Regex used to maintain the display property of animated table elements
466- tableTag : new RegExp ( "/(TABLE|TR|TD|TH|THEAD|TBODY|TFOOT)/" )
465+ // Regex used to preserve display property of certain elements
466+ protect : new RegExp ( "/TABLE|TR|TD|TH|THEAD|TBODY|TFOOT/" )
467467
468468} ) ;
469469
You can’t perform that action at this time.
0 commit comments