Trying to reply to a topic with an exisiting edit draft opens the composer with the edit draft as a reply instead

If you start editing a post, then click x to save the edit draft, clicking on Reply, the composer opens with your edit draft and not a blank composer. The composer is not even an edit action; it posts a reply with the edited post.

I think the reason for this is that the topic is serialized with a string draft field, so handling multiple drafts per topic isn’t built in.

Repro steps:

  1. Start editing an exisiting post. Make a few changes so a draft is saved. Do not submit the edit.
  2. Close the composer with the x button.
  3. Click on the Reply button in the topic. Your edit draft appears, not a blank composer. The composer’s action is to reply, not even to edit.
4 likes

Added repro steps to OP for clarity.

2 likes

Just merged a fix for this in FIX: check if saved draft is an edited post (#43680) · discourse/discourse@bc06b6d · GitHub that should correctly set the actions as “edit”.

We don’t currently have the functionality for multiple draft edits/replies (only multiple topic drafts) so it is a bit tricky — we may add that in the future.

3 likes