Ticket #4002 (closed bug: duplicate)
Problem with selectors in Safari
|Reported by:||friedcell||Owned by:||john|
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.