diff options
author | Oleg Gaidarenko <markelog@gmail.com> | 2014-04-26 21:24:05 +0400 |
---|---|---|
committer | Oleg Gaidarenko <markelog@gmail.com> | 2014-04-30 17:05:48 +0400 |
commit | c34dbf5a8d135e0f873ab7a76d1c8f8e316f31e4 (patch) | |
tree | ab9ad095f7b3554de59045e29c8e6eb8f8c3dfe0 /test/unit/effects.js | |
parent | bbace100a3ad51287cd2864eeb03ddebb381d44f (diff) | |
download | jquery-c34dbf5a8d135e0f873ab7a76d1c8f8e316f31e4.tar.gz jquery-c34dbf5a8d135e0f873ab7a76d1c8f8e316f31e4.zip |
Effects: Respect display value on inline elements
Take "olddisplay" value into the account
Fixes #14824
Closes gh-1566
Ref 73fe17299a840a8a7f3ffffcac15e32a88bd3d66
Diffstat (limited to 'test/unit/effects.js')
-rw-r--r-- | test/unit/effects.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/unit/effects.js b/test/unit/effects.js index 15e67ec1a..ceef87afe 100644 --- a/test/unit/effects.js +++ b/test/unit/effects.js @@ -2158,4 +2158,28 @@ test( "slideDown() after stop() (#13483)", 2, function() { clock.tick( 10 ); }); +test( "Respect display value on inline elements (#14824)", 2, function() { + var clock = this.clock, + fromStyleSheet = jQuery( "<span id='span-14824' />" ), + fromStyleAttr = jQuery( "<span style='display: block;' />" ); + + jQuery( "#qunit-fixture" ).append( fromStyleSheet, fromStyleAttr ); + + fromStyleSheet.slideUp(function() { + jQuery( this ).slideDown( function() { + equal( jQuery( this ).css( "display" ), "block", + "Respect previous display value (from stylesheet) on span element" ); + }); + }); + + fromStyleAttr.slideUp( function() { + jQuery( this ).slideDown( function() { + equal( jQuery( this ).css( "display" ), "block", + "Respect previous display value (from style attribute) on span element" ); + }); + }); + + clock.tick( 800 ); +}); + })(); |