23

As a moderator on a site that I moderate, upon clicking the "delete" link on a comment, I am shown a "Really delete this comment?" browser confirmation prompt; regardless of how I respond, the comment is deleted. The same occurs for undeletion: a "Really undelete this comment?" prompt, and the comment is undeleted regardless of the response.

The correct behavior is that moderators should not be prompted to confirm comment deletions or undeletions. This is how it worked before, which is important when we need to delete a large number of comments from a thread (fairly common). Incorrect or accidental deletions can be trivially reversed with a single additional click, so no confirmation is required.


Technical details:

This bug has very similar behavior to (and likely the same root cause as) When a moderator upvotes a comment on a site they moderate, the error message "You cannot mark a comment more than once" shows up, in that both appear to be related to the action being attempted twice. I'm reporting it separately to ensure that both get fixed, and to ensure that the correct behavior (no prompt) is documented.

If I click OK on the delete prompt, two https://stackoverflow.com/posts/comments/$COMMENT_ID/vote/10 POST requests are made, and the comment is deleted. If I click cancel, one request is made, and the comment is still deleted. The same occurs for undeletion, with two requests to https://stackoverflow.com/admin/posts/$POST_ID/comments/$COMMENT_ID/undelete on OK, and one request on cancel (with the comment being undeleted in either case).

4
  • 2
    Observation: UNDELETE --> CANCEL also proceeds with the undelete of a comment. Doesn't matter if its my comment or some other user's comment.
    – Criggie
    Commented Jun 26 at 22:27
  • 2
    @Criggie "The same occurs for undeletion: a "Really undelete this comment?" prompt, and the comment is undeleted regardless of the response."
    – Ryan M
    Commented Jun 26 at 22:27
  • Pressing <escape> on keyboard while dialogue box is up, does successfully cancel the action.
    – Criggie
    Commented Jun 26 at 22:44
  • 3
    @Criggie that does not work for me. still performs the action regardless
    – Dragonrage
    Commented Jun 26 at 22:46

1 Answer 1

10

Two bugfixes went out just a bit ago -- one for this problem, and one for the related issue re: comment upvotes and unupvotes.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .