Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Fixes coniditional path for tr, td defaultDisplay() calls. Fixes #10416 #530

Closed
wants to merge 2 commits into from

2 participants

Rick Waldron Timmy Willison
Rick Waldron
Collaborator

Submitting for review.

Tested

  • FF3.6.x,7
  • Chrome 14
  • Safari 5.1
  • IE 7
  • Opera 11.51

Need help with IE6,8,9... Issues with Browserstack preventing testing

Timmy Willison
Collaborator

Landed in commit 22f2e8b.

Timmy Willison timmywil closed this October 04, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
2  src/effects.js
@@ -38,7 +38,7 @@ jQuery.fn.extend({
38 38
 					// Set elements which have been overridden with display: none
39 39
 					// in a stylesheet to whatever the default browser style is
40 40
 					// for such an element
41  
-					if ( display === "" && jQuery.css( elem, "display" ) === "none" ) {
  41
+					if ( display === "none" || ( display === ""  && jQuery.css( elem, "display" ) === "none" ) ) {
42 42
 						jQuery._data(elem, "olddisplay", defaultDisplay(elem.nodeName));
43 43
 					}
44 44
 				}
15  test/unit/effects.js
@@ -188,6 +188,21 @@ test("show() resolves correct default display #8099", function() {
188 188
 
189 189
 });
190 190
 
  191
+test("defaultDisplay() correctly determines tr, td display #10416", function() {
  192
+
  193
+	expect( 1 );
  194
+	var tr = "<tr></tr>",
  195
+			td = "<td>new</td>";
  196
+
  197
+	jQuery( tr ).append( td ).appendTo( "#table" );
  198
+	jQuery( tr ).hide().append( td ).appendTo( "#table" ).show();
  199
+
  200
+	equal(
  201
+		jQuery( "#table" ).find( "tr" ).eq( 1 ).css( "display" ),
  202
+		jQuery( "#table" ).find( "tr" ).eq( 0 ).css( "display" ),
  203
+		"defaultDisplay() returns correct tr display values"
  204
+	);
  205
+});
191 206
 
192 207
 test("animate(Hash, Object, Function)", function() {
193 208
 	expect(1);
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.