Hi ,
As I am working on banking application,and should restrict copy paste in entire application. kindy suggest some solution.
I have already used the below code,but its not working:
.content { background-color: #ffffff; -webkit-user-select: none; / Chrome all / Safari all / -moz-user-select: none; / Firefox all / -ms-user-select: none; / IE 10+ / user-select: none; / Likely future / }
Regards,
Sowndarya
Hi,
even if you can fix it with css, people always can view the source or trace the network.
So I am not sure if you even can meet those requirements with a simple css
Add this javascript to your screen initialization:
$(document).ready(function () {
$('input').bind('copy paste', function (e) {
e.preventDefault();
});
If you don't have/want to use jQuery you can do with native javascript:
document.querySelector('input').onpaste = function(e) {
}
document.querySelector(ínput').onCopy = function(e) {
Or on a specific input as extended property:
onpaste="return false"
onCopy="return false"
Daniël Kuhlmann wrote:
Hi Daniel,
I tried adding extended property,but its not working. Also used the JavaScript in Oninitialize of the module and it thows an error of null.
document.querySelector('Input_UsernameVal').onpaste = function(e) { e.preventDefault();}document.querySelector('Input_UsernameVal').onCopy = function(e) { e.preventDefault();}
Can you tell me what input should i give,the name of input box or ID.
Hi again,
I did a quick check but the extended properties implementation does work for me:
Traditional Web application. Worked!!! Thanks!!!
Using JQuery to have the paste functionality blocked for all inputs also works for me:
Hi Daniël Kuhlmann,
I am also trying to do the same in the extended properties of the input and its not working, I am using OS11 Mobile (11.6.2) and I am testing it using OS Now. Could it be because of the emulator?
Update: Also tried the JS and it didnt worked as well. I havent found any more solutions other than those two so i dont know where to go from here...
Hello sowndarya b,try with this css pointer-events: none;