Applies to Product - Power Apps
What’s happening?
The customer is unable to restrict users from copying and pasting content while accessing canvas apps.
Reason:
Restricting users from copying and pasting content within a canvas app can be challenging, as it often depends on the platform and the level of control over the app's environment.
Resolution:
- Script Solutions: If the canvas app allows for custom scripting, use the following script to disable the copy-paste functionality: javascript document.addEventListener('copy', function(e) { e.preventDefault(); }); document.addEventListener('paste', function(e) { e.preventDefault(); });
- CSS Solutions: Use CSS to disable text selection, which can help prevent copying: css .no-copy { user-select: none; -webkit-user-select: none; /* Safari */ -moz-user-select: none; /* Firefox */ -ms-user-select: none; /* Internet Explorer/Edge */ }
- Platform-Specific Settings: Check if the platform offers settings or plugins to restrict copy-paste functionality.
- Custom Event Handlers: If the canvas app allows for custom event handling, intercept and prevent copy-paste events.
