Fix animation bug when resizing textfield