Skip to main content

Bug Tracker

Side navigation

#5759 closed bug (wontfix)

Opened January 05, 2010 07:53PM UTC

Closed January 06, 2010 06:01PM UTC

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:
Description

Hi,

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

Attachments (0)
Change History (2)

Changed January 06, 2010 12:37AM UTC by dmethvin comment:1

Seems like it may be related to this fix?

http://github.com/jquery/jquery/commit/2a6de9ab66653e5e424d9cc79d195b555158d04f

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?

Changed January 06, 2010 06:01PM UTC by john comment:2

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.