destroy edit window after input text