Rough 'save on focus lost' implementation