Fix the click effect timing issue by utilizing onTranstisionEnd event.