At the moment when there is a change in content and therefore size of content, resetAnimation doesn't get called and it cause unexpected behaviour.