[thelist] Right click in firefox

VOLKAN ÖZÇELİK volkan.ozcelik at gmail.com
Mon Oct 31 01:16:44 CST 2005


Hi Robert,

You may try

document.oncontextmenu = function(){
  popUpMyLovelyHiddenContextLayer();
  //some other cross-browser code to cancel event bubbling and default action
  return false;
};

It is supported in Mozilla 1.75 and above, no safari support and I've
not tested Opera8 yet. PPK (http://www.quirksmode.org) knows better
for sure.

However be aware that Mozilla has an option in user preferences to
override the context menu action that is set through js.

If you really want to disable context menu then java or flash seems to
be your only choice imho.

HTH,
--
Volkan Ozcelik
+>Yep! I'm blogging! : http://www.volkanozcelik.com/volkanozcelik/blog/
+> My projects/studies/trials/errors : http://www.sarmal.com/



2005/10/31, Robert Vreeland <vreeland at studioframework.com>:
> Hello list,
>
> I'm looking for a way to consistently disable the right click in Firefox.
> Now before I get a slew of responses asking why or pointing out how 'bad' it
> is, here is the reason why:
>
> We have a for fee private application that uses the browser for the UI.
> Currently the application only supports IE on the PC, but we would like to
> extend the support to Firefox. As stated, it is an application and is not a
> public web site. Additionally, our users expect the right click to behave as
> if it where a desktop application; i.e. a contextual application specific
> menu. It is not an attempt to 'prevent' users from stealing images or source
> code as what protections are afforded us come from the licensing agreement.
>
> I have done my share of research on google for this, and have come across a
> lot of info on how to prevent disabling of the right click in Firefox, or
> why it is 'bad' to disable the right click, but not how to do it. So, while
> I wholly support the debate over the detriments or merits of disabling right
> click on a public site, please do not make this post into one of those
> debates.
>
> Thanks in advance,
>
> Robert Vreeland
> --
>
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>



More information about the thelist mailing list