Prevent hiding or showing when animation is in progress