PDA

View Full Version : Opera Problem: contextmenu Event not recognized



soeren
11 Jun 2007, 2:48 AM
Hi,

thanks to ExtJS I could build a File Manager with a directory tree and a grid that displays the list of files. I have added listeners to the contextmenu event for both- the TreePanel and the Grid (ColumnModel).

If I right-click a tree node or a column in the grid, the context menu is displayed. This works for FF2 and IE6/7 - but in Opera 9.2 nothing happens. I have enabled "allow right-click actions?" globally and site-wide, but the event seems not to be recognized. Instead the standard Opera context menu is shown.

The same goes for the Demos in the Docs (ExtJS 1.0.1a and 1.1beta1). If I browse them with Opera I can't invoke the custom context menus which are usually visible in FF2 and IE.

Is this a problem with my Opera Configuration or a known problem?

ciao, S

mystix
11 Jun 2007, 3:19 AM
try holding down CTRL while right-clicking in Opera?

soeren
11 Jun 2007, 3:40 AM
No,

this doesn't help. Still just the standard Opera context menu comes up. Have you had the chance to test an ExtJS Demo with Context Menus (e.g. under Tree -> Dependency Builder) with Opera? Doesn't work for me.

ciao, S

mystix
11 Jun 2007, 6:48 AM
you're right... i tried the Editor Grid example for 1.0.1a and the grid header context menu doesn't show up when right-clicked in Opera.

according to Opera, enabling the "Allow script to receive right clicks" option allows js scripts to receive the right click event, so you might want to explore that option. You'll also probably have to poke around in FireBug to see what mouse events are being fired after you enable this setting.

For now, you might have to do an Opera detect, and then hotwire an ALT-leftclick to show the context menu instead.

soeren
13 Jun 2007, 5:18 AM
Well,
I surely could do that, but a user expects a context menu to open on right-click, not on Alt-Left-click.
Also there's no Firebug for Opera afaik. Maybe it's a known problem - I'm not a an Opera user and maybe Opera doesn't handle this right click event at all.

Btw: I experienced the same problem with Konqueror on Linux: the custom context menu won't show, but just the standard Konqueror Context Menu.

Could somehow help here or shed more light on this?
Thanks-
ciao, S

liggett78
13 Jun 2007, 5:37 AM
Opera developers generally discourage custom context menus, so the browser always shows the standard one (I would guess the contextmenu event is never triggered and you can't even prevent the default action with e.stopEvent() or "Allow right click" setting or similar). It used to be so in prev. versions of Opera. Since you can't get it to work with Opera 9.20, I suppose this intentional "hole" is still there. One can argue about whether it's right or wrong, but it is "by design".

Lariel
14 Jun 2007, 9:12 AM
This problem with Opera is also bugging me. But this is a nice solution: http://extjs.com/playpen/ext-2.0/examples/grid/grid3.html
Is this only part of the new Ext 2.0 or is it possible to activate this left click contextmenu in 1.0?

jsakalos
11 Jul 2007, 9:54 AM
Does this have any solution?

I'd also need to display contextmenus in Opera.

mystix
11 Jul 2007, 7:53 PM
doesn't seem like it... poking around in the opera forums also turned up nothing.
it's like someone placed a gag order on the entire subject.

i used to be able to do context menus with Opera 8.x via ALT + right-click,
but Opera 9.x simply intercepts all right-click events.

here's a link (http://www.dynamicdrive.com/dynamicindex1/jsdomenu/index.htm) to a script that creates a right-click context menu that supposedly works with Opera 7.x, but i don't have a copy of that installed currently so i can't test it out.

[edit]
managed to find Opera 7.x and 8.x here (http://www.oldversion.com).
tried 7.11 and 8.53, and unfortunately, neither of them work...

jsakalos
12 Jul 2007, 12:35 AM
Hi mystix,

thanks for info. I'm not going too deep into this, better to say I've already solved it by keyboard shorcut that displays context menu.

If you are interested you can see it here (http://aariadne.com/filetree) together with "Note for Opera users". ;)

mystix
12 Jul 2007, 2:06 AM
Hi mystix,

thanks for info. I'm not going too deep into this, better to say I've already solved it by keyboard shorcut that displays context menu.

I you are interested you can see it here (http://aariadne.com/filetree) together with "Note for Opera users". ;)

sweet! =D>

mxu
6 Dec 2007, 12:41 PM
context menu won't show up at Ext 2.0 on Opera

mystix
6 Dec 2007, 5:13 PM
context menu won't show up at Ext 2.0 on Opera

context menus won't show up for Opera 7.11 / 8.53+. It's not an Ext thing.
there's no way i know of to capture the right-click event in Opera. 8+

just fyi, jsakalos has implemented an alternative method of displaying context menus in Opera involving the use of a modifier key (the ALT key IIRC):
http://aariadne.com/filetree

suntsu
5 Jan 2010, 5:33 AM
We are in 2010 and the version 10 of Opera still does the same thing...
I don't understand this developper choice because with FF, Chrome and IE this works well :-(

sergiu079
30 Mar 2010, 4:10 AM
Also verify if "Preferences" -> "Advanced" tab -> "Content" menu -> "JavaScript options..." button -> "Allow script to receive right clicks" checkbox is set.