mirror of
https://github.com/jquery/jquery.git
synced 2024-12-09 08:04:24 +00:00
Fix #14290. Don't throw if text node is appended to table. Close gh-1371.
This commit is contained in:
parent
4671ef15c2
commit
ec3ac9a247
@ -52,7 +52,7 @@ require( "./event" );
|
|||||||
// Manipulating tables requires a tbody
|
// Manipulating tables requires a tbody
|
||||||
function manipulationTarget( elem, content ) {
|
function manipulationTarget( elem, content ) {
|
||||||
return jQuery.nodeName( elem, "table" ) &&
|
return jQuery.nodeName( elem, "table" ) &&
|
||||||
jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, "tr" ) ?
|
jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ?
|
||||||
|
|
||||||
elem.getElementsByTagName("tbody")[0] ||
|
elem.getElementsByTagName("tbody")[0] ||
|
||||||
elem.appendChild( elem.ownerDocument.createElement("tbody") ) :
|
elem.appendChild( elem.ownerDocument.createElement("tbody") ) :
|
||||||
|
Loading…
Reference in New Issue
Block a user