Disabling Clipboard on Zebra TC77 in Kiosk Mode

Solved
JJ
Jim J
Delta Air Lines, Inc.

I had and interesting situation handed to me today. I display the device serial number in the title of the SOTI Kiosk. Even with Disable Copy / Paste feature enabled. The end user can long press on the serial number which brings up the Copy popup. This allows the user to get to the PHONE and other features. 

Still running:

Server 14.1.2

Agent: 13.8.0.1047

Android: 8.1.0

Management: AEDO

Thoughts?

6 years ago
Android
ANSWERS
RC
Raymond Chan Diamond Contributor
6 years ago

Hi Jim,

It's probably faster to list the code here than to find the link to the thread. 

Firstly, include the following  before  </style>

.unselectable
{
-webkit-user-select:none;
cursor: default;
}

html
{
-webkit-touch-callout: none;
-webkit-user-select: none;
user-select: none;
-webkit-tap-highlight-color: rgba(0,0,0,0);
}

Then, add the following javascript  before the </head> tag 

<!-- Disable Copy and Paste-->
<script language='JavaScript1.2'>
function disableselect(e) {
return false
}

function reEnable() {
return true
}

document.onselectstart = new Function ("return false")

if (window.sidebar) {
document.onmousedown = disableselect
document.onClick = reEnable
}
</script>

Solution
RC
Raymond Chan Diamond Contributor
6 years ago

This was answered in an earlier post.  A few lines of codes can be added to the html/CSS template to disallow text/object selection in the image rendered by the browser engine used by the kiosk launcher.

JJ
Jim J
6 years ago

Raymond, 

Thanks for your answer. Would you have a link to that thread. I haven't been able to find it. 

Thanks,

Jim

JJ
Jim J
6 years ago

Raymond, 

Thank you very much for taking the time to post this solution. I have implemented in a test template and it appears to work. I am letting my testers hammer on the device a little more before I release it to production. 

If you are at Sync, I would like to say Hi. 

Jim