"Select a rating" does not always work

This topic contains 2 replies, has 3 voices, and was last updated by  Stiofan O’Connor 5 years, 7 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #483348

    Patrick
    Full Member
    Post count: 17

    Hello all,

    Just a FYI that I’ve observed that “Select a rating” (in the Comments section) does not always work: the stars don’t respond to hover or click actions, and it is impossible to pick a rating.

    The root cause appears to be in geodirectory.js:
    setTimeout(function(){gd_init_rating_input();}, 100);

    This waits an ARBITRARY amount of time for Font Awesome to load, leading to a possible race condition.

    The fix is to remove the delay altogether (set to 0 or run the code when the page is ready) and load Font Awesome through CSS instead of JS. This should lead to a slight perf improvement in addition to resolving the race condition. If you have any input on why this is not a good idea, please let me know.

    #483393

    Alex Rollin
    Moderator
    Post count: 27815

    Thanks for the feedback Patrick, we will take a look at that.

    #483404

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Patrick,

    That is already wrapped inside a doc ready function, the 100ms is to allow the JS version to initialise, i tested in many situations and 100 was always worked, i will however change it to 250 for edge cases i was not able to re-create. Again this is just the time allowing the JS FA to initialise, not the load time of any file.

    Thanks,

    Stiofan

Viewing 3 posts - 1 through 3 (of 3 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount