Bug Tracker

Opened 8 years ago

Closed 8 years ago

#8317 closed bug (invalid)

parentsUntil not working correctly

Reported by: Mathijs Giesbers Owned by:
Priority: low Milestone: 1.next
Component: traversing Version: 1.5
Keywords: Cc:
Blocked by: Blocking:

Description

The problem occurs after upgrading to version 1.5 (from version 1.4.2)

the problem is with the selectors:

$item.parentsUntil($root) is not working (previously it did work)
$item.parentsUntil("#"+$root.attr("id")) is working

so when using a string based selector there is no problem, when using objects as selectors the function is not working. The error message is "c.replace not found"

Change History (1)

comment:1 Changed 8 years ago by jitter

Component: unfiledtraversing
Priority: undecidedlow
Resolution: invalid
Status: newclosed

Thanks for taking the time to contribute to the jQuery project by writing a bug report.

This isn't a bug. The .parentsUntil documentation reads:

selector A string containing a selector expression to indicate where to stop matching ancestor elements.

So the selector needs to be a string. Passing a jQuery object to .parentsUntil() is an invalid usage of the method.

Note: See TracTickets for help on using tickets.