Bug Tracker

Opened 13 years ago

Closed 13 years ago

#5759 closed bug (wontfix)

Webkit table cell replaceWith() issue

Reported by: kuvik Owned by:
Priority: critical Milestone: 1.4
Component: core Version: 1.4a2
Keywords: Cc:
Blocked by: Blocking:



I found a bug in jQuery 1.4a2: When you use a replaceWith() method on a hidden table cell, it breaks the table in Webkit browsers (for example Chrome 3). In IE8, Firefox 3.5 and Opera 10 it works correctly.

I also tried jQuery 1.3.2 and it doesn't show the bug in any browser.

Testcase (1.3.2): http://gamca.informacie.sk/betatest/webkit_table2/index_1-3-2.html Testcase (1.4a2): http://gamca.informacie.sk/betatest/webkit_table2/index_1-4a2.html

Change History (2)

comment:1 Changed 13 years ago by dmethvin

Seems like it may be related to this fix?


The test page has this css rule:

table td:first-child {
  display: none;

With 1.4 it's removing the first td from the document before inserting the replacement, so maybe Safari is then hiding the second td based on the rule. You would think that reinserting the replacement td as the first child would make it show again, but that doesn't seem to be happening?

comment:2 Changed 13 years ago by john

Resolution: wontfix
Status: newclosed

I'm going to have to concur with Dave here - I think it's an issue with Webkit's CSS :first-child rendering, unfortunately. And doubly-unfortunately there's not a whole lot that we can do to fix it. My suggestion would be to add a class to the first child in the page and style it that way - it'd be much more likely to be consistent across all browsers, too.

Note: See TracTickets for help on using tickets.