3 of 5 edited tags

Comment link doesn't redirect to the comment when there are too many comments

Take an example on this question. Find my comment which read like:

@Johan - Option 2 is already there. 10k+ users can edit deleted posts too.

This is the link of that comment But it is not redirecting us to the comment. The possible reasons I can say is:

  • there are too many comments so some comments are hidden by default including mine.
  • the comment is not upvoted (so it is not showing by default in other words we have to click on add / show X more comments).

When we see all comments then the link redirects us there.


Edit:

After this comment by @Oded I have found the actual bug:

When all comments are shown the comment's link is like question-link#comment-<CommentID> (which redirects successfully when all comments are shown). But it will not redirect when all comments are not shown. Example link:

http://meta.stackoverflow.com/questions/196731/can-we-nuke-spam-hate-answers-from-orbit-instead-of-just-marking-them-as-delete#comment-621699

To redirect on hidden comments the URL is: question-link#comment<CommentID>_QuestionID. (Which redirects successfully even when all comments are not shown). Example link:

http://meta.stackoverflow.com/questions/196731/can-we-nuke-spam-hate-answers-from-orbit-instead-of-just-marking-them-as-delete#comment621699_196731

But comment's timestamp gives the first link (without QuestionID). So we need to change that link.

Tested on Chrome (Version 29.0.1547.66 m), Firefox (23.0.1), Windows XP