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: | cod@iresults.li | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 2.0b1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
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 comment:1
resolution: | → notabug |
---|---|
status: | new → closed |
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 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 comment:4
Here you can see that the inner structure is set correctly:
Changed March 24, 2013 01:31AM UTC by comment:5
Btw, working on table
instead of tbody
works, too: http://jsfiddle.net/q9HYu/9/
Line 315 of manipulation.js handle this:
callback.call( table && jQuery.nodeName( this[ i ], "table" ) ? findOrAppend( this[ i ], "tbody" ) : this[ i ], node, i );
Changed March 24, 2013 01:48AM UTC by 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: https://github.com/jsfiddle/jsfiddle-issues/issues/355)
If you want the tr to go into the existing tbody then append it there.