What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 122 Stack Exchange communities.

Whenever I load a post for which I've voted (on main and mobile), it first shows the normal vote buttons, and, a few seconds later, it highlights my vote.

enter image description here

This is annoying because I don't remember my votes, and I tend to tap/click the upvote button again. This leads to an unupvote. I get the "vote locked" popup, usually, but there have been some cases where the unipvote executes successfully.

Some tinkering in the dev tools gives me this (To avoid having to time the screenshot properly, I just disabled JS to make stuff easy for myself)

Right after page load,before JS runs/if JS is disabled:

enter image description here

Wait five seconds/enable JS and refresh:

enter image description here

It seems that the vote-up-on class is added dynamically, after page load, via JS/jQuery (the same goes for star-on on the favstar).

Why are we adding CSS classes dynamically? What's wrong with attaching the vote-up-on,vote-down-on, and star-on classes server-side? I'm not a professional programmer, but this makes me O_0.

This delay is annoying and confusing. Fix please?

share|improve this question
add comment

You must log in to answer this question.

Browse other questions tagged .