jquery core: Fixed #5202. Fixing selector generation when a manipulation function receives a jQuery object.
This commit is contained in:
parent
66c58e9db6
commit
0790989eb6
|
@ -295,8 +295,7 @@ jQuery.each({
|
||||||
jQuery.fn[ original ].apply( jQuery(insert[i]), elems );
|
jQuery.fn[ original ].apply( jQuery(insert[i]), elems );
|
||||||
ret = ret.concat( elems );
|
ret = ret.concat( elems );
|
||||||
}
|
}
|
||||||
|
return this.pushStack( ret, name, insert.selector );
|
||||||
return this.pushStack( ret, name, selector );
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ test("jQuery()", function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
test("selector state", function() {
|
test("selector state", function() {
|
||||||
expect(30);
|
expect(31);
|
||||||
|
|
||||||
var test;
|
var test;
|
||||||
|
|
||||||
|
@ -126,6 +126,13 @@ test("selector state", function() {
|
||||||
test = jQuery("#main").eq(0);
|
test = jQuery("#main").eq(0);
|
||||||
equals( test.selector, "#main.slice(0,1)", "#main eq Selector" );
|
equals( test.selector, "#main.slice(0,1)", "#main eq Selector" );
|
||||||
equals( test.context, document, "#main eq Context" );
|
equals( test.context, document, "#main eq Context" );
|
||||||
|
|
||||||
|
var d = "<div />";
|
||||||
|
equals(
|
||||||
|
jQuery(d).appendTo(jQuery(d)).selector,
|
||||||
|
jQuery(d).appendTo(d).selector,
|
||||||
|
"manipulation methods make same selector for jQuery objects"
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
test("browser", function() {
|
test("browser", function() {
|
||||||
|
|
Loading…
Reference in a new issue