Skip to main content

Bug Tracker

Side navigation

#4002 closed bug (duplicate)

Opened January 27, 2009 08:52AM UTC

Closed February 12, 2009 07:25PM UTC

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: (permanent

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.

Attachments (0)
Change History (3)

Changed February 01, 2009 10:11PM UTC by joelataylor comment:1

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

Changed February 12, 2009 01:58PM UTC by warp comment:2

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.

Changed February 12, 2009 07:25PM UTC by john comment:3

resolution: → duplicate
status: newclosed

This has already been fixed (sample test case):

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