Skip to content

Comment drafts on merge requests are lost when scrolling

Summary

When you are drafting a comment on a merge request and scroll to a certain depth, the text which you have written into the comment box disappears. This causes you to lose your work.

Steps to reproduce

  1. Go to !134003 (diffs)
  2. Begin writing a comment on a line inside the first file
  3. Scroll down to the very bottom of the diff (note: This was reproduced displaying multiple files at a time)
  4. Scroll back up to the first file
  5. The text which you had written in the comment box is now gone

Screen_Recording_2023-10-27_at_10.46.39_AM

What is the current bug behavior?

Comment draft disappears

What is the expected correct behavior?

Comment draft should remain

Output of checks

This bug happens on GitLab.com

Possible fixes