Bug Tracker

Opened 14 years ago

Closed 14 years ago

#4002 closed bug (duplicate)

Problem with selectors in Safari

Reported by: friedcell Owned by: john
Priority: major Milestone: 1.3.2
Component: selector Version: 1.3.1
Keywords: Cc:
Blocked by: Blocking:


I encountered a really weird problem in Safari in the 1.3+ releases of jQuery.

The case: http://jquery.nodnod.net/cases/37 (permanent http://friedcellcollective.net/js/Cases/select-active.txt)

When you click a node it is marked as selected and all it's parent nodes are marked as active. When you deselect, it iterates through the active parent nodes, checking if they have any selected descendants - if they do, they're left active, otherwise their active state is removed.

It works in 1.2.6, but doesn't in 1.3 or 1.3.1 in Safari and Chrome. Buggy behaviour is observed in both .parents(selector) and .find(selector) as they return some elements that don't match or don't return elements that match the selector.

The easiest way to reproduce the bug is to select the three smallest nodes and then deselect them.

Even delaying the selection doesn't help so this is not a timing issue.

Change History (3)

comment:1 Changed 14 years ago by joelataylor

I'd like to confirm this bug and would love to be notified when it's safe to use 1.3!

comment:2 Changed 14 years ago by warp

I can too confirm this bug. This is a major blocker for us at the moment :-/

Statements like $("...", DOMElement) and $("...").find("...") behave wrongly on Safari with jQuery 1.3. They'll _sometimes_ work, but most often not select the proper elements.

A pity this bugtracker does not have a voting option.

comment:3 Changed 14 years ago by john

Resolution: duplicate
Status: newclosed

This has already been fixed (sample test case): http://dev.jquery.com/~john/ticket/4002/

As it turns out it was a duplicate of #4058 and was fixed when we fixed that.

Note: See TracTickets for help on using tickets.