Bug/discussions: quoting text by pressing "r" overwrites comment

Just ran into this bug while writing an answer to one of the posts on our newly activated discussions.

This seems to only apply to answer-threads. What’s especially annoying about this is that you’ll lose the entire typing history of your written comment, which made me decide to report this bug here.

How to reproduce:

  1. Find a post in a discussions thread with answers enabled
  2. Comment on one of the posts, but don’t submit yet
  3. Select some text and press “r” for quoting it
  4. Your entire comment will be overwritten instead of the quoted text being appended to it
  5. You’ve lost the entire typing history and can’t restore it (CTRL+z) and you’ll have to rewrite everything again