Konkqueror and KHTML engine - disable right click

68 views Asked by At

I'm using Konqueror 4.14.25 with KHTML engine and cannot disable the right click (the context menu). I've tried

document.addEventListener('contextmenu', function(event) { event.preventDefault() });

but it seems that the contextmenu event does not exist. Using webkit engine i am able to disable the right click! Due to the project tasks I am forced to use Konqueror browser with KHTML engine. Any idea how can I disable the right click?

1

There are 1 answers

0
lazerbrain On BEST ANSWER

After many unsuccessful combinations and tries I finally found one that should work:

        document.oncontextmenu = function() {
           return false;
        }

Also

<body oncontextmenu="return false;">

won't works. The reason is unknown. khtml does not recognize it.