jquery core: closes #5186. getElementsByTagName optimization was breaking the selector attribute.
This commit is contained in:
parent
9de120e6d7
commit
bf230ffb6a
1 changed files with 2 additions and 2 deletions
|
@ -111,6 +111,7 @@ jQuery.fn = jQuery.prototype = {
|
|||
|
||||
// HANDLE: $("TAG")
|
||||
} else if ( !context && /^\w+$/.test( selector ) ) {
|
||||
this.selector = selector;
|
||||
selector = document.getElementsByTagName( selector );
|
||||
|
||||
// HANDLE: $(expr, $(...))
|
||||
|
@ -129,8 +130,7 @@ jQuery.fn = jQuery.prototype = {
|
|||
return rootjQuery.ready( selector );
|
||||
}
|
||||
|
||||
// Make sure that old selector state is passed along
|
||||
if ( selector.selector && selector.context ) {
|
||||
if (selector.selector !== undefined) {
|
||||
this.selector = selector.selector;
|
||||
this.context = selector.context;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue