Probably related to this issue: Cursor jumps from the line end to widget decorator , but the “key” property solution does not work.
Minimal example: https://glitch.com/edit/#!/apple-veil
- Click on the last empty line in the document
- Wait 3 seconds for the “fake” cursor to appear
- Type something quickly, for example “123123”
Notice that native browser cursor is at the end of the line, but as soon as the “fake” cursor starts to catch up, browser cursor jumps to it and follows it.
- The problem ONLY happens when you start typing on the empty line. At the end of an existing line, or in the middle of it it works fine (cursor does not jump)
- The problem happens in Chrome, but does not happen in Firefox
- The problem goes away if you comment out the .widget() call
- The problem goes away if you add +1 (but not -1) to the widget position