Copy branch button in sticky header on MR can sometimes contain literal HTML string instead of rendered HTML

The copy branch button in the sticky header on an MR is not the same one used in the regular header. The sticky header one comes from app/helpers/merge_requests_helper.rb and is in haml, while the regular one is in Vue.

The haml one can be put into a state where instead of rendered html, the literal html string of the contents is shown instead.

To reproduce:

  1. Go to an MR
  2. Scroll down until the sticky header is shown
  3. Click on the Copy branch name button
  4. Hover the Copy branch name button to see the copy tooltip. It should appear as expected.
  5. Move the cursor away until the tooltip disappears
  6. Hover the Copy branch name button again
  7. See the raw HTML of the tooltip content inside the tooltip instead of seeing the intended contents as seen in step 4 above.

image