Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
wants to merge 2 commits into from

2 participants

@rwaldron
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

@timmywil
Collaborator

Landed in commit 22f2e8b.

@timmywil timmywil closed this
@mescoda mescoda referenced this pull request from a commit in mescoda/jquery
@rwaldron rwaldron Landing pull request 530. Fixes coniditional path for tr, td defaultD…
…isplay() calls. Fixes #10416.

More Details:
 - jquery#530
 - http://bugs.jquery.com/ticket/10416
b25907c
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.
Showing with 16 additions and 1 deletion.
  1. +1 −1  src/effects.js
  2. +15 −0 test/unit/effects.js
View
2  src/effects.js
@@ -38,7 +38,7 @@ jQuery.fn.extend({
// Set elements which have been overridden with display: none
// in a stylesheet to whatever the default browser style is
// for such an element
- if ( display === "" && jQuery.css( elem, "display" ) === "none" ) {
+ if ( display === "none" || ( display === "" && jQuery.css( elem, "display" ) === "none" ) ) {
jQuery._data(elem, "olddisplay", defaultDisplay(elem.nodeName));
}
}
View
15 test/unit/effects.js
@@ -188,6 +188,21 @@ test("show() resolves correct default display #8099", function() {
});
+test("defaultDisplay() correctly determines tr, td display #10416", function() {
+
+ expect( 1 );
+ var tr = "<tr></tr>",
+ td = "<td>new</td>";
+
+ jQuery( tr ).append( td ).appendTo( "#table" );
+ jQuery( tr ).hide().append( td ).appendTo( "#table" ).show();
+
+ equal(
+ jQuery( "#table" ).find( "tr" ).eq( 1 ).css( "display" ),
+ jQuery( "#table" ).find( "tr" ).eq( 0 ).css( "display" ),
+ "defaultDisplay() returns correct tr display values"
+ );
+});
test("animate(Hash, Object, Function)", function() {
expect(1);
Something went wrong with that request. Please try again.