Closed (fixed)
Project:
Fivestar
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
3 Apr 2013 at 14:21 UTC
Updated:
15 Feb 2014 at 22:20 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
__cj commentedThis is because of a slight change in the way jQuery handles negative numbers in the :lt() selector - prior to 1.8 negative number select nothing, but 1.8+ items are unselected from the end of the array (consistent with the behaviour of slice).
I've created a JS fiddle at demonstrate this:
jQuery 1.6 - http://jsfiddle.net/Z5QYz/
jQuery 1.8 - http://jsfiddle.net/Z5QYz/1/
You'll see in the 1.6 version none of the divs are selected, while in the 1.8 version the last one is.
The attached patch fixes this (and still works with previous versions of jQuery), and removes lt selector in favour of slice - this is better for performance (see 'Additional Notes' at http://api.jquery.com/lt-selector/).
EDIT: I also posted a bug for jQuery Docs, which have now been updated with a 'Prior to jQuery 1.8' note explaining the above.
Comment #2
__cj commentedComment #3
ryck commentedJust bumped in to this bug and fixed it the same way.
Comment #5
__cj commentedIssue #2130495: The default value is wrong with jQuery 1.8 was opened as a duplicate of this.
Comment #6
whiteph commentedMerged up, and available to download in 7.x-2.x-dev