Transition only when the modal is open