rammohan.acharyadasa
Posts: 0
Joined: Thu Apr 05, 2012 5:03 pm

how to disable copy/paste option

Hi
i am developing native app using tiggzi.
i want to disable copy/paste option for the content i display on the page.
i got below link for this:
http://kvijayanand.wordpress.com/2011...
Using how can i use option1 ( mentioned in above link) i..e, how to add to the page using tiggzi.
body ondragstart=”return false” onselectstart=”return false”.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

how to disable copy/paste option

It seems to be a solution for desktop browsers.. not mobile apps. There are three ways to add any custom JavaScript:

  • Create a new JavaScript file
  • Load JavaScript file via URL
  • Run JavaScript in action
rammohan.acharyadasa
Posts: 0
Joined: Thu Apr 05, 2012 5:03 pm

how to disable copy/paste option

Max,
i found this link.
pls advice will it work mobile phones?

http://phonegap.pbworks.com/w/page/16...
%3A%20Prevent%20copy%20paste

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

how to disable copy/paste option

There is an example in the link you provided:

code
.my_text_element {
-webkit-user-select: text; /* enable copy paste for elements with this class */
}
/code

Alex GG
Posts: 0
Joined: Thu Nov 14, 2013 11:11 pm

how to disable copy/paste option

Hello!, Is there any way to disable copy paste on iphone, inside appery.io platform?
I have a grid with labels, images; and while scrolling up or down sometimes the element is marked and copy/paste appear.

I have found several post on stackoverflow, but dont know how to fix this...
http://stackoverflow.com/questions/11...

Regards

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

how to disable copy/paste option

Hi Alex,

Run this custom CSS:
pre*{
-webkit-touch-callout: none;
user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
}/pre

Alex GG
Posts: 0
Joined: Thu Nov 14, 2013 11:11 pm

how to disable copy/paste option

Perfect!!!
thanks!!!

Alex GG
Posts: 0
Joined: Thu Nov 14, 2013 11:11 pm

how to disable copy/paste option

Katya,
Is there any way to make this code works on specific pages? because I have a page where user types his name, mail and number, and with this CSS code, now is disabled...

Thanks!

Alex GG
Posts: 0
Joined: Thu Nov 14, 2013 11:11 pm

how to disable copy/paste option

update:
I replaced (*) with .unselectable, and set this class to the container of all the pages except for the one with input data...
thanks!

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

how to disable copy/paste option

Thank you! Do you need further help?

Return to “Issues”