Disable Right Click and Copy Paste In Oracle APEX

Disable Right Click and Copy Paste In Oracle APEX.

Preview

If you want to disable right click and Copy paste from your whole application then use below code globle page.

Create Dynamic action and paste below code.

  1. Event > Page load.
  2. Action > Execute JavaScript code.

If you want to use only in single page then copy and paste below code in Execute when Page Loads.

$(document).ready(function () {
    //Disable cut copy paste
    $('body').bind('prevent cut copy paste', function (e) {
        e.preventDefault();
    });
   
    //Disable mouse right click
    $("body").on("contextmenu",function(e){
        return false;
    });
});

document.body.addEventListener('keydown', event => {
  if (event.ctrlKey && 'cvxspwuaz'.indexOf(event.key) !== -1) {
    event.preventDefault()
  }
})

comments powered by Disqus