only replace document text after some timeout