codidact / qpixel

Q&A-based community knowledge-sharing software
https://codidact.com
GNU Affero General Public License v3.0
397 stars 68 forks source link

When changing answer ordering on a page, can we not jump all the way back to the top? #944

Open cellio opened 1 year ago

cellio commented 1 year ago

https://meta.codidact.com/posts/287127

On questions, below the question body and above the answers, there's a control where you can choose to sort by score or activity. If you change the sort, we reload the page and you're back to the top of the page. Are we able to put you back at the top of the answers list? If we don't have an anchor there already, could we add one and then when we reload the page, instead of reloading the original URL we'd reload the URL + that anchor?

ArtOfCode- commented 1 year ago

Adding an anchor to the answers section (if there isn't one) and redirecting there isn't too hard.