react using the touch event

react development support of the event, onClick event, part of the label does not support click, only onTouchEnd, but in the end move, touch your finger to the event binding element, sliding, will trigger the event, it is to share solutions with better way to welcome comments

 

1. events changed

onClickCapture

but

When you're done, you will find that you can click, Android phones tested, completely ok, but the ios, the event does not take effect, at this time, complete the following one, to solve a half,

 

2. element binding event to add: cursor: pointer;

However, there is actually really efficient! ! !

 

but

But it

Why would click on the gray bottom frame ======

Extremely sick

 

 

However, geese did not give up,

Try the following solutions

Please line up thumbs up

 

 

3. Add css styles

*{

    -webkit-tap-highlight-color: transparent;

 }


~ ~ ~ More perfect solution
----------------
Disclaimer: This article is the original article CSDN bloggers "m0_38073829", and follow CC 4.0 BY-SA copyright agreements, please attach a reprint the original source link and this statement.
Original link: https: //blog.csdn.net/m0_38073829/article/details/75350700

Guess you like

Origin www.cnblogs.com/wrhbk/p/11490593.html