Comment nodes are discarded from a merge, for no apparent reason. Fixes #5438.
This commit is contained in:
parent
6a722e251d
commit
ef05f44cce
1 changed files with 2 additions and 13 deletions
11
src/core.js
11
src/core.js
|
@ -444,20 +444,9 @@ jQuery.extend({
|
||||||
// expando of getElementsByTagName
|
// expando of getElementsByTagName
|
||||||
var i = 0, elem, pos = first.length;
|
var i = 0, elem, pos = first.length;
|
||||||
|
|
||||||
// Also, we need to make sure that the correct elements are being returned
|
|
||||||
// (IE returns comment nodes in a '*' query)
|
|
||||||
if ( !jQuery.support.getAll ) {
|
|
||||||
while ( (elem = second[ i++ ]) != null ) {
|
|
||||||
if ( elem.nodeType !== 8 ) {
|
|
||||||
first[ pos++ ] = elem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
while ( (elem = second[ i++ ]) != null ) {
|
while ( (elem = second[ i++ ]) != null ) {
|
||||||
first[ pos++ ] = elem;
|
first[ pos++ ] = elem;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return first;
|
return first;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue