save state of text field in edit event