Skip to content

Tooltip for references in Markdown is misplaced when wrapping splits reference

Summary

When a reference (for example to a merge request) is split when wrapping at the end of a line, the tooltip is placed in the middle of the line and does no longer connect with the references.

Steps to reproduce

  • write a comment that contains a reference to a merged merge request
  • resize window such that merge request number is at end of line (and (merged) in the next line)
  • hover merge request reference

or

  • view this comment at exactly 1400px window width so the text splits
  • hover wrapped merge request reference

What is the current bug behavior?

Tooltip is placed in the middle of the line:

misplaced-tooltip

What is the expected correct behavior?

Tooltip is placed next to reference.

Possible fixes

We should probably use   in references such that they don't get split:

Screen_Shot_2018-03-02_at_20.09.00

Edited by 🤖 GitLab Bot 🤖