Bug when you click Reply To Topic and then Click on the pencil Edit icon

To reproduce:

  1. Go to a post that you have the power to edit. (My example is this.)
  2. Click on Reply To Topic (either the message-specific one or the whole-topic one)
  3. The pop-in from the bottom appears with “Reply to Module-defined (Location) Tags” and its confirm button is “Reply To Topic”
  4. Without clicking cancel, go click on the pencil edit icon on the post
  5. Now the pop-in has title “Editing post 1 darius” but the confirm button still says “Reply To Topic” => The confirm button text is wrong. I don’t know if the internal state is right or wrong.
  6. If you make any changes and click cancel, it says “Are you sure you want to abandon your post?” => I see that this is standard behavior, but I think this is a misleading message for canceling an edit.
1 Like

This is not actually a Discourse bug, but rather a bug in some JavaScript hack we did to help people learn to use threaded replies. :wink:

:arrow_left: Reply to :burke: vs. :arrow_left: Reply

I have commented out the JS to re-write the composer window confirm button, and it seems to be behaving how I would expect. Feel free to try it out and comment here with your findings.

Thanks!

I tried and this seems better. (Also, it now gives an “add edit reason” which I don’t remember seeing before).

My suggestion: avoid JavaScript hacks to fast-changing Discourse software unless they’re really adding significant value. :slight_smile:

1 Like

We keep our non-CSS customization to a bare minimum. :slight_smile:

That said, the hack could possibly go in to the core product because it does seem to be correcting people replying out of context…