mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Effects: Respect display value on inline elements
Take "olddisplay" value into the account Fixes #14824 Closes gh-1566 Ref73fe17299a(cherry-picked fromc34dbf5a8d) Conflicts: src/effects.js
This commit is contained in:
@@ -152,4 +152,7 @@ section { background:#f0f; display:block; }
|
||||
/* #11971 */
|
||||
#foo { background: url(1x1.jpg) right bottom no-repeat; }
|
||||
|
||||
/* #14824 */
|
||||
#span-14824 { display: block; }
|
||||
|
||||
#display { display: list-item !important; }
|
||||
|
||||
24
test/unit/effects.js
vendored
24
test/unit/effects.js
vendored
@@ -2214,4 +2214,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 );
|
||||
});
|
||||
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user