How to disable right click in Opera using JavaScript

sookie

sookie

@sookie-T06sFW Oct 26, 2024
Hi All,

Since last few hours I am trying a script for disabling right click in all browsers done either through keyboard or mouse. It is working fine in other browsers except in Opera. I even changed the settings of this Opera browser but still it is not accepting right click associated events. Anyone any ideas? Why it is so? Any solutions for this ? Why this following line doesn't work in Opera? 😔
document.oncontextmenu=new Function("return false");
Thanks a lot !

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • Kaustubh Katdare

    Kaustubh Katdare

    @thebigk Sep 19, 2009

    sookie
    Hi All,

    Since last few hours I am trying a script for disabling right click in all browsers done either through keyboard or mouse. It is working fine in other browsers except in Opera. I even changed the settings of this Opera browser but still it is not accepting right click associated events. Anyone any ideas? Why it is so? Any solutions for this ? Why this following line doesn't work in Opera? 😔

    Thanks a lot !
    MaRo is the one to answer this one. MaRo - over to you 😁

    PS: Take a look here - Options -> Advanced -> Content -> JavaScript Options, and Site preferences -> Scripting
  • sookie

    sookie

    @sookie-T06sFW Sep 19, 2009

    The_Big_K
    MaRo is the one to answer this one. MaRo - over to you 😁

    PS: Take a look here - Options -> Advanced -> Content -> JavaScript Options, and Site preferences -> Scripting
    Thanks but what you told is I have already tried as I mentioned in my earlier post also. Changing browser preference settings for "context menu in javascript" is also not working. 😔

    Still waiting for better responses. 😔

    Thanks !