Fix transition for Firefox

Firefox fire the event "transitionend"

https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Using_CSS_transitions#Detecting_the_completion_of_a_transition