Fixed check for event cancellation or no transitionend event support to call the transitionend handler