This is extracted from #986 (comment) where it is noted that if you type very fast, the cursor might be reset and the text may be inserted incorrectly. The original issue has been improved a lot upon (thank you!) but it is still possible to hit this - either manually if you try or easily during tests.

I open this bug to keep track of the issue as testing is an important scenario for us.