-4

When editing a comment:

If no edit is made, then why is the "Save edits" button is active? The "Save edits" button is expected to be inactive until the edit is made.

No edit => nothing to save (because it is already saved). Isn't that the case?

3
  • @yivi I think he's asking why the button is enabled even if there wasn't any change to the comment. The linked answer says something should be visible but disabled when it can't accept user input
    – davidsbro
    Commented Jan 11, 2022 at 16:55
  • Well, it's consistent with the "Add comment" button that is enabled even if nothing is typed in. Same with the "Post Your Answer" and "Post your question" buttons. It's also consistent with the "Save edits" button for posts. That said, "Save edits" (on both comments and posts) does act like it submits something even when nothing is submitted, unlike the other buttons mentioned above that will just display a validation error message. So, I see your point.
    – 41686d6564
    Commented Jan 11, 2022 at 18:00
  • Could it be related to this? Commented Jan 12, 2022 at 10:34

1 Answer 1

7

As a moderator, the current functionality of having that button active (not disabled) and allowing a non-edit to be "saved" is a useful feature under some conditions. If this is changed (at least if it's just a change in the front end), it would be something I'd re-enable with a userscript.

When dealing with comment flags, a moderator can only mark the flag helpful by either deleting the comment or editing the comment. While it's a moderately rare corner case, there have been times when I've wanted to both mark the flag as helpful and not change the flagged comment (e.g. a custom flag asking for something which doesn't result in that comment being deleted or changed). Currently, the only way to do that is to submit a null-edit, which wouldn't be possible (without a userscript) if that button is disabled when the contents are identical to the original comment content.

5
  • 2
    So, you're saying that although clicking "Save edits" without changing anything does not submit an edit, it does submit something to the backend? Edit: I actually just tested that on this comment and it did submit a POST request to /posts/comments/[commentId]/edit. Apparently, the validation is done on the server side.
    – 41686d6564
    Commented Jan 11, 2022 at 18:50
  • 3
    @41686d6564 Yes, that's correct. Your testing is consistent with the testing I've done, and, I assume, others have done, The POST indicating an edit is actually sent. The check is in the backend, not the frontend. If it wasn't the actual comment edit POST which resulted in marking the comment flag as "helpful", then we, moderators, would probably already have a "mark helpful" button, even if we had to add it ourselves with a userscript. Admittedly, it's still tempting to add such a button, but it's a fairly rare case when we want to mark a comment flag helpful, but not delete or actually edit.
    – Makyen Mod
    Commented Jan 11, 2022 at 19:00
  • @41686d6564 Re: "it does submit something to the backend": can you please check what exactly it submits?
    – pmor
    Commented Jan 13, 2022 at 17:28
  • Why not creating the "mark helpful" button to avoid submitting a null-edit?
    – pmor
    Commented Jan 13, 2022 at 17:30
  • 1
    @pmor SE could create such a button, which is one of the variety of changes moderators would like to see in how we are able to handle comment flags. However, moderator's can not, currently, mark a comment flag as helpful without editing the comment or deleting the comment. It's just not possible with the interfaces we're aware of from the backend software. Thus, having a userscript which creates a "mark helpful" button isn't all that much benefit over the currently available two steps of A) click on "edit" for the comment and then B) click on "Save edits" to submit a null edit.
    – Makyen Mod
    Commented Jan 13, 2022 at 20:10

You must log in to answer this question.

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