1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed Decimal Ratings get lost after Mouse hover

Discussion in 'Resource Manager Resolved Bugs' started by Sadik B, Mar 1, 2012.

  1. Sadik B

    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 -> http://xenforo.com/community/resources/template-modification-system-tms.293/

    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! :)
    Fuhrmann likes this.
  2. Sadik B

    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.
  3. Brogan

    Brogan 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.
  4. Mike

    Mike XenForo Developer Staff Member

    If you mouse out, it goes to 5 though.
  5. Mike

    Mike XenForo Developer Staff Member

    Should have this fixed locally now.

Share This Page