Apr/085
Firefox: Enable custom javascript context-menus
I want to replace or disable the browsers context menu on some pages. This task is not as easy as it sounds. There are some cross-browser issues with e.g. opera and safari. In the mentioned case this is no problem for me: Support for Firefox and Internet Explorer is enough.
But even full firefox support is not easy to realise. I had a problem with a firefox installation on ubuntu gutsy. When I called the contextmenu by doing a right-click on the page the default browser context menu opened (The custom context menu was covered by the default context menu). I knew the javascript code was correct cause it worked with some IEs, with the Firefox on a Windows system and also with the Firefox on another Linux system. So what’s the problem?
Firefox has an option which can be set by the user to prevent overriding the context menu by javascript. You can change the option as follows:
This option can be changed by calling about:config in the address bar and setting the option dom.event.contextmenu.enabled to True.
The option can even be changed through the Firefox GUI: “Tools > Options > Content > Advanced > Disable or replace context menus”.
Hope this saves someones time…
me@flickr

Es hat geschneit!

Urban

Der Zahn der Zeit

Alte Süderelbbrücke vom nördlichen Ufer

Alte Süderelbbrücke - Hamburg

Blick in die Ferne...

Das letzte Gänseblümchen

Hamburg - Alte Elbbrücke

Hundeportrait - Mr. Matchley Wonder

Intensive Farben

Vergänglichkeit

Insektenhotel

Herbstlandschaft

Heideblüte

Der Herbst ist da!

Panorama - Elba

Wo ist das Leckerli?

Ausruhen

Fly away...

Möwe auf der Lauer
Popular
Random
Categories
- Beagleboard (3)
- Blog (12)
- Crap (6)
- HP 2133 (7)
- HTPC (8)
- Javascript (9)
- Link collection (6)
- Monitoring (3)
- Nagios (51)
- Open Source (38)
- Perl (2)
- PHP (4)
- Software Tipps (15)
- VBS (2)
- Windows (7)
- WL-500gp (2)
Blogroll








00:04 on December 15th, 2010
“I had a problem with a firefox installation on ubuntu gutsy. When I called the contextmenu by doing a right-click on the page the default browser context menu opened (The custom context menu was covered by the default context menu). I knew the javascript code was correct cause it worked with some IEs, with the Firefox on a Windows system and also with the Firefox on another Linux system.” Where I have been able to read about this?
20:40 on February 11th, 2011
Google Maps googlemaps context menu <– just adding some useful search engine tags. It’s such an easy fix, you’d think they’d list it in their help section. Right click mouse over Google Maps in Firefox is frustrating when it shows the browser context menu instead of the maps menu. Having researched it several times, I was lead to believe it was a bug with FF and had to do some protracted key presses to get around the issue. When in fact all it is a check box in the configuration. Genius!!!
19:38 on February 12th, 2011
When you allow the site to block the context menu, they can prevent the normal context menu from working. So uncheck that box in the settings (disable or replace context menus) and just press when the site’s context menu is overridden.
This is much safer.
11:07 on February 25th, 2011
I’d be grateful to anyone to can advise me on real and belatedd solutions. Thank you!
11:12 on February 25th, 2011
Two Questions: is there ant correlation between javascript and reCaptcha (undefined) errors ie when at Craigslist and trying to post an ad or repspond to one that requires typing in the reCaptcha verification words, the box or words never pop up. I’m having the same problem with some Firefox sites. At other sites, the reCaptcha word (OCR image) verification boxes do pop up. I’ve been in that useless CL help forum for FOUR months and not once has staff or posters come up with a solution. I’ve even asked for help at ZDNet. com (experts in reCaptcha) and they have not responded either. HOW can I restore being able to use CL or other recaptcha sites? Second question: when at my Hotmail accounts, a phony popup overides the mail page and says I cannot access Hot mail unless I answer a FORCED survey. Here’s the link: premium_c.s3.amazonaws.com. Some tech sites have said bogus sites have been using Amazon and other credible links as actual spam and malware. I have found NO way to block this and have reported the site time and again to no avail. What can be done? Thank you! Tj