mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
fixed jQuery.dir regression introduced with 1.4 *untils patch that errored when traversing XHTML text nodes with an until test
This commit is contained in:
@@ -235,7 +235,7 @@ jQuery.extend({
|
||||
|
||||
dir: function( elem, dir, until ) {
|
||||
var matched = [], cur = elem[dir];
|
||||
while ( cur && cur.nodeType !== 9 && (until === undefined || !jQuery( cur ).is( until )) ) {
|
||||
while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
|
||||
if ( cur.nodeType === 1 ) {
|
||||
matched.push( cur );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user