Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

Bug: hiding selected answers shows "0 answers" with qa-a-selected style

0 votes
asked Oct 20, 2011 in Q2A Core by Scott
edited Oct 20, 2011 by Scott
If you select an answer for a question, then hide the answer, the question shows up in the list with "0 answers", but italso has the qa-a-selected class applied. In my case, this makes the text green even though there is obviously not an actual selected answer.

Just thought you'd like to know :)

EDIT: also happens after answers are deleted. I'm assuming the selected answer ID is stored in the question row, so either there should be an extra check if the ID is valid, or if that's too complex then remove the ID when the selected answer is hidden/deleted.
commented Oct 20, 2011 by Aslan
moved Sep 13, 2012 by Scott
I can verify this bug. Good found, DisgruntledGoat.

1 Answer

0 votes
answered Sep 13, 2012 by Scott
Just bumping this... the issue still occurs.

As well as the above, it happens when a selected answer is converted to a comment.

So when any of these events happen, the "selchildid" of the question needs to be reset to NULL.