Comment text clearing on failed save
### Summary I'm getting properly-handled 422 errors back from the API (https://gitlab.com/gitlab-org/gitlab/-/issues/331305) when I try to save a comment on an open merge request. Unfortunately, the frontend seems to not be preserving the text of my comment on the error, so I'm forced to retype the whole thing again to try to send it again. We normally preserve text in forms across navigation etc. to prevent such loss of draft writing. ### Steps to reproduce 1. Open https://gitlab.com/gitlab-com/www-gitlab-com/-/merge_requests/81207/diffs 2. Try to save a comment with a suggestion in it to line 3 of `data/release_posts/13_12/browser-performance-job-rename-release-update.yml` that currently fails. <!-- Describe how one can reproduce the issue - this is very important. Please use an ordered list. --> ### Example Project - gitlab-com/www-gitlab-com, MR linked above. ### What is the current *bug* behavior? The comment box is cleared and my writing is gone when the "Failed to save" error message appears. ### What is the expected *correct* behavior? My comment should be persisted, so I can try to fix my input or at least save the text somewhere outside of the browser to preserve my writing while I figure out the problem. ### Relevant logs and/or screenshots ![lost_comment](/uploads/5a95669e3f3ee65cf11eb46c01982ffd/lost_comment.mp4) ![image](/uploads/764f563a57e449c9618eb5a7178071f2/image.png) ### Output of checks This bug happens on GitLab.com ### Possible fixes <!-- If you can, link to the line of code that might be responsible for the problem. -->
issue