h5 input can not enter shield issue press event

H5 app developers suddenly found long on the phone by copying and pasting text menu will appear, as long as the text is long press will happen less in line with some really interactive, for deliberately look through a little blog, I have been under Solution ;

The default menu to disable all the elements out

. 1  * {
 2  -webkit-Touch-allout : none ; // disable the system default menu
 . 3  User-SELECT : none ; // do not allow the user to select
 . 4  -webkit-User-SELECT : none ;
 . 5  -moz-User-SELECT : none ;
 . 6  -ms-User-SELECT : none ;
 . 7 }

 But then, so write it will not be a problem with the input of the input box on ios, so to add the following code

. 1  INPUT, TextArea {
 2  -webkit-User-SELECT : text ; allows the user to select the text //
 3 }

Well, the perfect solution to the problem

Reproduced in: https: //www.cnblogs.com/wrhbk/p/10983715.html

Guess you like

Origin blog.csdn.net/weixin_34292402/article/details/92994471