Bug Tracker

Opened 10 years ago

Closed 9 years ago

#14141 closed bug (duplicate)

Duplicate objects returned in Safari when using find on attribute (xml)

Reported by: [email protected] Owned by:
Priority: undecided Milestone: None
Component: selector Version: 1.10.2
Keywords: Cc: timmywil, gibson042
Blocked by: Blocking:


Safari in Windows, iPhone, and iPad returns duplicate objects when using the jQuery find on attribute. All other browsers we tried return correctly.

Safari seems to only return duplicates when the returned xml data is in the hundreds of objects.

Please see example code: http://jsfiddle.net/6fvYz/

In the example there should be only 155 zones in the returned data. Safari will return 162 zones with zones 183 through 189 duplicated.

Change History (3)

comment:1 Changed 9 years ago by dmethvin

Cc: timmywil gibson042 added
Component: unfiledselector

This concerns me because although jQuery can "solve" the problem by passing supposedly unique sets through $.unique it would have a major performance impact. That's assuming it's a Safari bug and not Sizzle, which I suppose we still need to prove by reproducing with native methods. @gibson042 or @timmywil what are your thoughts?

comment:2 Changed 9 years ago by timmywil

Seems to me if this is a Safari bug and it only occurs when there are hundreds of elements, it would be better to document a workaround (of passing the results through $.unique) rather than forcing all other selections to take a hit.

However, if we could reproduce the bug easily and write a feature test and if it only affects XML, we could still keep the number of cases that need to pass through $.unique to a minimum.

comment:3 Changed 9 years ago by gibson042

Resolution: duplicate
Status: newclosed

Duplicate of #14142.
Upon investigation, this bug was found to stem from numeric XML ids. It does not manifest in the current git builds.

Note: See TracTickets for help on using tickets.