recently typed text lost when closing editor
- open the text editor (new or existing file)
- type some stuff
- press the close button
Sometimes not all the typed text is saved.
This happens sometimes in automated UI tests, where the time between the input typing and pressing the close button is reasonably short. Typically the last couple of characters typed are not found in the file.
Without having looked at the underlying code, I guess there is some Java Script / AJAX happening at intervals to save the file. And I guess the close button is not doing a final save, it just closes the text area box, throwing away any unsaved edits.
During typing there is regular "Saving..." shown in the top bar of the text editor box (that is OK), but there is also lots of:
Cannot save file as it has been modified since opening
The file does get saved (maybe after the user has stopped typing for a second or so?), but this message does not inspire confidence.
I saw this message too today while typing random text for testing. Mostly you need to type while it is already saving.