Table with tfoot inside plain table results in weird DOM #3439
Comments
markelog
added Manipulation Needs review
labels
Dec 12, 2016
|
It seems like the same thing would happen without jQuery. We can't stop you from building invalid html. However, the test case is pretty large. Would it be possible to reduce this even further? There's a lot going there. |
timmywil
added Needs info and removed Needs review
labels
Dec 19, 2016
|
Ok, this one is kind of cool. A <tr> is being appended to a table that has no <tbody>, but contains an inner table that does have one. And when we try to find a <tbody> to contain the incoming row, we mistakenly use the one from the inner table. This should be a straightforward fix. |
gibson042
added Bug and removed Needs info
labels
Dec 19, 2016
|
Thanks for digging into that! |
ShyLionTjmn
commented
Dec 20, 2016
•
|
Why is it invalid? TBODY is not required when TR comes right after TABLE. |
|
@ShyLionTjmn at first glance, it looked like an unclosed tag or something, but @gibson042 dug further and it is a jQuery bug. |
gibson042
added a commit
to gibson042/jquery
that referenced
this issue
Dec 20, 2016
|
|
gibson042 |
1f614ed
|
gibson042
referenced
this issue
Dec 20, 2016
Merged
Manipulation: Restrict the tbody search to child nodes #3463
ShyLionTjmn
commented
Dec 21, 2016
|
Ok. Thanks. |
gibson042
referenced
this issue
Dec 24, 2016
Closed
Nesting tables on 3.1.1 results in an incorrect insert. #3472
leonardjo
commented
Dec 24, 2016
|
Seems indeed to be a duplicate of the issue I'm having. Commit 1f614ed fixes the issue I see. Thank you. |
gibson042
closed this
in #3463
Jan 9, 2017
gibson042
added a commit
that referenced
this issue
Jan 9, 2017
|
|
gibson042 |
efdb8a4
|
ShyLionTjmn commentedDec 8, 2016
•
edited
Create simple table with THEAD,TFOOT and TBODY tags and insert it into plain table with just TR and TD.
You will get broken table.
Here is an example:
https://jsfiddle.net/5kbwkzq8/5/