- Go to the 2010 WikiEditor
- Enable syntax highlight
- Move to the end of a line
- Click <ref></ref> listed beneath the edit area
- Notice the block is inserted, but the cursor moves to the front of the line.
Suspect this is because our setSelection calls setFocus AFTER moving the cursor. Googling suggests you should always focus before moving the cursor.
https://stackoverflow.com/questions/33394855/how-to-set-cursor-position-in-codemirror-editor