如何禁用复制&过去的文本功能,以及在Phonegap应用程序长按屏幕后来的IOS和IOS [英] How to disable the copy & past text functionality for ANDROID as well as IOS which is coming after long press on screen in Phonegap application

查看:138
本文介绍了如何禁用复制&过去的文本功能,以及在Phonegap应用程序长按屏幕后来的IOS和IOS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

>电话差距问题 -

Phone Gap issue-

如何禁用默认的文本复制粘贴功能的ANDROID以及IOS,这是后来长按在Phonegap应用程序的屏幕上。

How to disable the default text copy-paste functionality for ANDROID as well as IOS which is coming after long press on screen in Phonegap application.

我提到如何禁用jQuery Mobile(iOS)中Anchor的默认行为,但它不可行的解决方案。我想在config.xml文件中的代码。

I referred How to disable the default behavior of an Anchor in jQuery Mobile (iOS), but it is not feasible solution. I want code in config.xml file.

谢谢。

推荐答案

**Use below code:**
<style type="text/css">
*:not(input):not(textarea) {
  -webkit-user-select: none; /* disable selection/Copy of UIWebView */
  -webkit-touch-callout: none; /* disable the IOS popup when long-press on a link */
}       
</style>

**If you want Disable only anchor button tag use this.**
a {-webkit-user-select: none; /* disable selection/Copy of UIWebView */
   -webkit-touch-callout: none; /* disable the IOS popup when long-press on a link */
 }

这篇关于如何禁用复制&amp;过去的文本功能,以及在Phonegap应用程序长按屏幕后来的IOS和IOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆