Voting inside longer subthreads with jump marksby LanX (Sage)
|on Jul 18, 2021 at 21:57 UTC||Need Help??|
For discussion (and as reminder to myself)
Voting inside longer sub-threads with many posts is easy, you select ++ or -- and hit return.
But the request will return at the very beginning of the page and you need to scroll again to were you started.
actually there are anchors allowing to return from where you voted, like
one only needs to isolate the ID from the radio's name <input type="radio" name="vote__11135141" value="-1">
Minor complication is that one can vote on multiple nodes at the same time, identifying the one where the request was triggered might require some JS trickery.
In hindsight, implementing to vote with an AJAX request might be the better approach tho. It wouldn't require to reload the whole page and fiddling with the current vote mechanism.