Drafts can't be discarded in merge request comments
Summary
When I write a comment in a merge request diff and discard the changes, the comment draft is not deleted.
Steps to reproduce
- Open a merge request
- Navigate to the "changes" tab
- Add a comment to a file.
- Write something in the Content Editor or the Markdown Editor.
- Select "Cancel" to discard the draft.
- Repeat steps 3 and 4 on the same line selected previously.
- You will notice that the draft was not discarded.
Example Project
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: \`sudo gitlab-rake gitlab:env:info\`) (For installations from source run and paste the output of: \`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production\`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:check SANITIZE=true`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true`) (we will only investigate if the tests are passing)