Updated : support the case that both mouse event and touch event are exists.