Skip to content

Conversation

@gibson042
Copy link
Member

Fixes gh-3439

   raw     gz Sizes                                                            
267269  79153 dist/jquery.js                                                   
 86863  30052 dist/jquery.min.js                                               

   raw     gz Compared to master @ bf3a43eff8682b59cec785be6003753fa4b93706    
   +59    +19 dist/jquery.js                                                   
    -1     +9 dist/jquery.min.js

@mention-bot
Copy link

@gibson042, thanks for your PR! By analyzing the history of the files in this pull request, we identified @markelog, @timmywil and @rwaldron to be potential reviewers.

jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {

return elem.getElementsByTagName( "tbody" )[ 0 ] || elem;
return jQuery.filter( "tbody", elem.childNodes )[ 0 ] || elem;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clever, maybe a comment though? You know I like comments :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, what are you looking for that's not covered by the new function comment? Should I update it to something like "New rows for a table belong in its child tbody when one is present", or move it above this line, or something else?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, the code itself looks pretty clear and definitely has the benefit of being more correct. Funny that nobody thought about nested tables for this case.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It only comes up when the target doesn't have a tbody but a descendant does, or when such a descendant is in the thead, both of which I imagine are rare. And the logic itself goes waaaaaay back.

@markelog
Copy link
Member

@timmywil just FYI (in case you didn't know that): you can now approve pull requests, it seems a bit better then "reaction" :)

@timmywil timmywil self-requested a review January 9, 2017 16:37
@timmywil timmywil added this to the 3.2.0 milestone Jan 9, 2017
@gibson042 gibson042 merged commit efdb8a4 into jquery:master Jan 9, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants