Fixed Decimal Ratings get lost after Mouse hover

Sadik B

Well-known member
Hi so I was looking at the implementation of ratings in the RM and found an interesting bug.

1. Let's say we open this resource ->

2. Obviously, this is a GREAT addon and it's rating is 5/5. But let's change the rating value to 3.4, through Firebug or similar tool. We can do this by changing the contents inside RatingValue Number <span> tag.
<span class="RatingValue"><span class="Number">5</span>/5,</span>
So we make it,
<span class="RatingValue"><span class="Number">3.4</span>/5,</span>
3. Now since we obviously changed it through Firebug, we won't get a page refresh. But the classes "star Half" or "star Half Full" get employed on mouseover.

4. So if we mouseover over the stars and then leave the mouse from the stars, we expect 3 and a half stars, because the star classes got updated with jQuery but instead of 3 and a half stars we get 4 stars!

5. Now instead of 3.4 if we change the span value to 3.5, that is,
<span class="RatingValue"><span class="Number">3.5</span>/5,</span>
And then mouse hover over it and mouse leave, then we DO get 3 and a half stars correctly!

Yeah pretty minor I know and most likely a Javascript ceiling/floor issue so maybe not even worth fixing it immediately, but when you have too much time and a brand new toy, this is what happens! :)

Sadik B

Well-known member
This bug is visible on this Addon, which has a current rating value of 4.67. One page load, we see 4 and half stars, but when we hover mouse, it becomes 5.


XenForo moderator
Staff member
Have you rated that resource?

All I get on mouse over is the stars changing based on the position of the mouse pointer as ratings can now be given via both sets of stars.