9

Most of the time this happened to me when adding code-formatting to existing comments, since the backtick (`) is just below the Esc key in my keyboard layout.

It's really frustrating that all the work you've been formulating/thinking while editing the comment will just be discarded when pressing Esc accidentally.

It would be nice to add a prompt if you've made changes then you tried to cancel or maybe removing that functionality since there is already a cancel button.

10
  • 12
    Easier solution: Move to Spain. The escape key is on the other side of the keyboard here. And you get to enjoy nice weather and tasty sangrías.
    – yivi
    Commented Jun 9, 2021 at 10:10
  • 1
    Related: Add comment, leave page, lose comment
    – Tomerikoo
    Commented Jun 9, 2021 at 10:16
  • 2
    I can definitely reproduce this on Firefox Nightly 91.0a1, Linux. Submit a comment, then click “Edit”, add something to the comment, hit Esc: the edit gets discarded without a prompt and the edit process is canceled, just like clicking “Cancel”. This doesn’t happen while composing a new comment, but this is also not what the question is about… Commented Jun 9, 2021 at 16:05
  • 1
    @zcoop98 I am on Chrome / Win 10 and I can repro it. I'm on Chrome version 91.0.4472.77. Also repro'd on Microsoft Edge / Win 10.
    – 10 Rep
    Commented Jun 9, 2021 at 16:05
  • 2
    @10Rep I goofed– I didn't catch that the posts was talking specifically about editing a comment. I repro now.
    – zcoop98
    Commented Jun 9, 2021 at 16:15
  • I don't get it. Of course it works this way, this is how it always works when you type something into a dialog box and then press the Esc key: the dialog box is dismissed, and your work/changes are gone. I like this feature; it is useful, consistent, and predictable. If you don't like the Esc key, you could always use a MacBook Pro with the touch bar. :-)
    – Cody Gray Mod
    Commented Jun 9, 2021 at 17:26
  • 1
    Also worth mentioning that I imagine a userscript to address this would probably be pretty trivial.
    – zcoop98
    Commented Jun 9, 2021 at 20:49
  • @zcoop98 not that trivial as you might think :) Once it is out in the wild the users will start complaining the comments are not saved on their iOS/macOS Safari (storage & tracking protection...) Commented Jun 9, 2021 at 20:51
  • @CodyGray-onstrike, that's reasonable but I think the first time you press Esc then telling the user: Press Esc again to exit editor is not hard to implement.
    – Olie Cape
    Commented Jul 26, 2023 at 3:05
  • Also I believe that it is a common standard to prompt the user when there are unsaved changes in a textarea or form field before canceling or navigating away that would result in data loss.
    – Olie Cape
    Commented Jul 26, 2023 at 3:14

0

You must log in to answer this question.

Browse other questions tagged .