4942: Cursor size and position is confusing in wrapped markdown code snippet/block

arma_otter

What version are you running?

4.0.4

What's the URL of the page containing the problem?

What steps will reproduce the problem?

  1. Go to a review request (e.g. https://demo.reviewboard.org/r/1804/)
  2. Click 'Add General Comment'
  3. Enable markdown in the comment editor (if not enabled already)
  4. Start a new code snippet using a single backtick
  5. Type in the text 'test', then type in spaces until the text wraps onto a new line
  6. Click on a section of the wrapped line and type in some text - the text can show up in an unexpected position

What is the expected output? What do you see instead?

Expected: The cursor's height to only be a single line's height. Clicking or nevigating with arrow keys to different parts of the text should reflect the cursor's position accurately.

What I observed instead: The cursor's height changes to double the height and it's difficult to navigate within the wrapped text. Clicking to a position in the wrapped line and typing some text may have the text show up in an unexpected position as it's unclear where the cursor is actually at.

What operating system are you using? What browser?

macOS Big Sur (11.4)
Able to reproduce in Chrome 92.0, Firefox 91.0 and Safari 14.1.1

Please provide any additional information below.

Attached screenshots of the cursor height.