Skip to main content

Bug Tracker

Side navigation

#13647 closed bug (notabug)

Opened March 22, 2013 09:00AM UTC

Closed March 22, 2013 11:45AM UTC

Last modified March 24, 2013 01:48AM UTC

Duplicate tbody when inserting row into table

Reported by: Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 2.0b1
Keywords: Cc:
Blocked by: Blocking:

When inserting a new <tr> into a table a new <tbody> will be inserted.


Attachments (0)
Change History (6)

Changed March 22, 2013 11:45AM UTC by dmethvin comment:1

resolution: → notabug
status: newclosed

If you want the tr to go into the existing tbody then append it there.

Changed March 22, 2013 12:42PM UTC by comment:2

If I don't do something extremely wrong here, I think appending to the tbody makes it even worse:

Changed March 24, 2013 01:17AM UTC by m_gol comment:3

This works correctly on current jQuery 2.0 from git, although behaviour of jQuery 2.0b1 is, indeed, erroneous.

Could you advocate to jsFiddle somehow so that they introduce a jQuery 2.x edge option? It would be extremely useful...

Anyway, an updated test case with the current jQuery 2.0.0-pre:

Changed March 24, 2013 01:20AM UTC by m_gol comment:4

Here you can see that the inner structure is set correctly:

Changed March 24, 2013 01:31AM UTC by m_gol comment:5

Btw, working on table instead of tbody works, too:

Line 315 of manipulation.js handle this:
	table && jQuery.nodeName( this[ i ], "table" ) ?
		findOrAppend( this[ i ], "tbody" ) :
		this[ i ],

Changed March 24, 2013 01:48AM UTC by m_gol comment:6

(a little OT but related to what I wrote before - I created a ticket for adding jQuery 2.x edge lib to jsFiddle: