When does Textastic save file changes?

Here you can find details about the saving mechanism.

Notes

Textastic automatically saves file changes every 10 seconds and when the file is closed to open another file.

By using the Undo button you can undo changes in the currently open file.