Insert Suggestion uses wrong line of code with multiple comments open
Summary
When using the Insert Suggestion feature with multiple comments open, the suggestion contains the incorrect line of code.
Steps to reproduce
- Navigate to an MR to review
- Click to create a comment on a line of code changed in the MR
- Click to create another comment on another line of code changed in the MR
- Click insert suggestion on the second open comment box
Example Project
56KBs/gitlab-suggestion-bug!31 (diffs)
What is the current bug behavior?
When clicking insert suggestion on the second (or third, etc) open commenting box, the first comment boxes line of code is used as the suggestion.
What is the expected correct behavior?
The suggestion should be the line of code from the comment box that the insert suggestion button was pressed on.
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com
