Use the transitionend event to hide the from view after a transition.

This ensure that the transition has completed, and that we won't have
weird-looking transition where the from view is hidden just before the
transition end.