also update the textfield only when the popup closes