There is a long-known but rather random issue with the CodeMirror integration in VisualEditor. It happens only there because the way the two extensions interact is a little special. Roughly speaking, VisualEditor sits on top of CodeMirror, but is set to opacity: 0. The text cursor and text selections are done in the upper VisualEditor layer.
Sometimes these layers don't align:
- Sometimes it's a special character in a line that's rendered different in the two layers. In cases like this the cursor is misplaced one or more characters to the left/right.
- Apparently there are also situations where the cursor is misaligned an entire line up/down. This might be related to extremely long articles, or specific skins.
So what's this task about? Review all existing tickets here on Phabricator and check if any of them is related to what we, the WMDE-TechWish team, did. Especially make sure that the line number gutter we introduced didn't made any of the existing issues worse.
Discussed in story time on 2021-08-25, see https://docs.google.com/document/d/1Fj5ljAEtb_bEUeK-hMb3KzVzGohopp9WCakVnTar5Tc/edit#heading=h.4coyz4cwoadg.