Skip to content

Fixes jQuery bug #8539 #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Fixes jQuery bug #8539 #53

wants to merge 1 commit into from

Conversation

jryans
Copy link

@jryans jryans commented Mar 16, 2011

From bug 8539 (Sizzle cache collision in browsers without querySelectorAll):

In browsers without querySelectorAll (IE 6, IE 7, FF 3.0), Sizzle marks the elements it encounters as seen for a particular selection run. The value used as a marker is an integer that comes from an internal counter which is incremented before each new selection, and these markers on left on the elements after selection completes.

This causes trouble when there are two copies of Sizzle on the page. Running a selection in Sizzle copy A sets the marker on a set of elements to 0. If you then run a selection in Sizzle copy B that passes through the same elements, Sizzle will assume it is safe to use a cached value at that point, since the stored marker of 0 matches copy B's marker for this run. This gives unexpected selection results.

See http://jsfiddle.net/uz4dt/6/ for a test case. The second test fails for browsers without querySelectorAll.

@timmywil
Copy link
Member

We have implemented a different fix for this.

@timmywil timmywil closed this Jan 23, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants