Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.0 upgrade guide doesn't mention breaking change to TABLE/TBODY under manipulation #171

Closed
rmacfadyen opened this issue Feb 14, 2018 · 2 comments

Comments

@rmacfadyen
Copy link

rmacfadyen commented Feb 14, 2018

per: JQuery 3.1.1 vs 2.2.4 change in behavior appending rows to a table jquery/jquery#3976

The following code:

$('<TABLE />').append('<TR><TD>1</TD></TR>').appendTo('BODY');
results in slightly different DOM structures.

Under 2.2.4 you get <TABLE><TBODY><TR>...

Under 3.1.1 you get <TABLE><TR>...

(one has a TBODY and one does not)

This causes problems if you later have selectors like #id TBODY TR (to get all the body rows, and no header rows).

Apparently the fix for jquery/jquery#1835 in 3.0.0 is why.

Not sure what the upgrade guide should say though (I really don't understand the scope or the reason why #1835 resulted in this change). It did affect my upgrade of some code (unexpectedly)... and I had reviewed the upgrade guide specifically looking for breaking changes before upgrading.

Maybe something like "document fragment of a single TABLE element will no longer have a TBODY created automatically"?

@noxo
Copy link

noxo commented May 17, 2023

dupe to #232

@mgol
Copy link
Member

mgol commented May 17, 2023

Closing as a duplicate

@mgol mgol closed this as not planned Won't fix, can't repro, duplicate, stale May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants