I tried this way. but it's not working. I am using antd UI library
.copy-item-input .ant-input[disabled] {
cursor: pointer !important;
user-select: none;
I have a rich text editor (summer note), and on ios it's almost impossible to do anything. As you select any text you get the ios popup that never goes away. How to prevent it?
One option is to use user-select like this:
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
However, it will disable text selection altogether. I just want to hide the options pop up.
Thanks a lot.
I developed an mgwt,gwt-phonegap app and I installed it in ios device. I want to disable the cut ,copy and paste options to my text fields.
Is there any chance to do it through css? if not please provide me solution to achieve it.
This disable the copy / paste for everything except input :
*{
-webkit-touch-callout: none;
-webkit-user-select:none;
}
input {
-webkit-touch-callout: auto !important;
-webkit-user-select: auto !important;
}
You can use it to target your text fields only.
I have a phone gap/cordova application. I have a view that has a link, 2 textfields and text.
I want to remove copy,paste and select option from the web view.
Using:
[webView stringByEvaluatingJavaScriptFromString:#"document.body.style.webkitTouchCallout='none';"];
[webView stringByEvaluatingJavaScriptFromString:#"document.body.style.webkitUserSelect='none';"];
I was able to disable copy paste and select menu from web view, but it still lingers in the input fields , i.e textfields.
What i tried was to disable long press on the webview , that disable the magnify glass and as a result disables copy and paste menu, but the menu occurs while we double tap on the textfield too. How can i disable both long press and double taps on the webview?
I am bit confused whether my app will clear the review process for app store if i disable the magnify glass.
Please help me get a solution to this.
I think this has been discussed elsewhere but what ended up working for me was adding the following to the css.
/******************
disable select touch and hold and highlight colors
******************/
html {
-webkit-user-select: none;
-webkit-touch-callout: none;
-webkit-tap-highlight-color:rgba(0,0,0,0);
}
and if you still want it to work for input then
I added
input {
-webkit-user-select: auto !important;
-webkit-touch-callout: default !important;
}
Thanks to Phonegap styles -webkit-user-select: none; disabling text field
Use this.
<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 */
}
I wonder why you want to remove copy & paste functionality: Security concerns? If you want keep text selection and copy & paste within your application BUT you want to prevent people to copy&paste your content to other apps then check out Cordova plugin cordova-disable-copy-paste
I am using jQuery Autocomplete on my jQUeryMobile application. It works perfect. Now I'm trying to show vertical scrollbar to scroll through the list of looked up items. The scrollbar shows up on desktop safari, but not on iPAD safari. my css looks like this:
<style>
.ui-autocomplete
{
max-height: 100px;
overflow-y: auto;
/* prevent horizontal scrollbar */
overflow-x: hidden;
max-width:70%;
}
</style>
Can someone help, thanks!
Add this to your style:
-webkit-overflow-scrolling: touch;
Put the above style in CSS document of class body.....