Copying code from MR diff adds unintentional `user avatar` to text

When looking at a merge request diff, you can select and copy code and paste somewhere else. However, if someone has commented on the code, selecting and pasting those line causes user avatar to also be inserted in the text.

Diff with text selected Pasting of text

Screen_Shot_2021-07-28_at_2.20.27_PM

      expect do
        reference_filter(markdown)
user avatar 
      end.not_to exceed_all_query_limit(control_count)

      markdown = "#{project_reference} ~qwert ~werty ~ertyu ~rtyui #{project_reference2}"

      expect do
        reference_filter(markdown)
user avatar 
      end.not_to exceed_all_query_limit(control_count)
    end

Video

A video recording of this bug #337139 (comment 1054417997)

Notes

This bug happens for Safari browser and it happens in both side-by-side and inline diff modes.

The copying works fine in both Chrome and Firefox.

Edited by Michael Le