Skip to content
Permalink
Browse files
body default display is always block. @mikesherov was right and this …
…is the proof. Fixes #10227
  • Loading branch information
rwaldron committed Oct 4, 2012
1 parent 52a8422 commit 60f546a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
@@ -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,

0 comments on commit 60f546a

Please sign in to comment.