mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
body default display is always block. @mikesherov was right and this is the proof. Fixes #10227
This commit is contained in:
parent
52a8422559
commit
60f546acb1
@ -9,7 +9,7 @@ var curCSS, iframe, iframeDoc,
|
||||
rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ),
|
||||
rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ),
|
||||
rrelNum = new RegExp( "^([-+])=(" + core_pnum + ")", "i" ),
|
||||
elemdisplay = {},
|
||||
elemdisplay = { BODY: "block" },
|
||||
|
||||
cssShow = { position: "absolute", visibility: "hidden", display: "block" },
|
||||
cssNormalTransform = {
|
||||
|
@ -560,6 +560,24 @@ test( "show() resolves correct default display, detached nodes (#10006)", functi
|
||||
div.remove();
|
||||
});
|
||||
|
||||
test("show() resolves correct default display #10227", function() {
|
||||
expect(2);
|
||||
|
||||
jQuery("html").append(
|
||||
"<p id='ddisplay'>a<style>body{display:none}</style><p>"
|
||||
);
|
||||
|
||||
equal( jQuery("body").css("display"), "none", "Initial display: none" );
|
||||
|
||||
jQuery("body").show();
|
||||
|
||||
equal( jQuery("body").css("display"), "block", "Correct display: block" );
|
||||
|
||||
jQuery("#ddisplay").remove();
|
||||
|
||||
jQuery.cache = {};
|
||||
});
|
||||
|
||||
test("toggle()", function() {
|
||||
expect(9);
|
||||
var div,
|
||||
|
Loading…
Reference in New Issue
Block a user