The problem is associated with non-character keys!
I have a page of original English text.
The French translation of it.
The reverse translation.
The cursor is at the end of the text.
I decide to edit the document, so I cursor up (instead of using the mouse).
I hit the up arrow 12 times.
The French translation reverts to English, and sits there in English.
I did this a few minutes ago, and it is still in English.
I'll now actually edit the document, adding a comma.
That sorts it.
And I've just tried it with the shift key, and that freezes it as well.
So the only keys that it likes are keys that actually edit the text.
Hmmmm I wonder if this was causing problems in the automated system.
Well it would have been causing problems.
Testing shows that I can do two rapid cursor moves, but not 3.
I wonder if there is a way of recognising that a character has been sent
, and then firing the function.
At the moment it is a catch all 'onkeyup'.
If this is fixed, I can retry the fully automated version again.