Index: /FCKeditor/trunk/editor/_source/classes/fckcontextmenu.js
===================================================================
--- /FCKeditor/trunk/editor/_source/classes/fckcontextmenu.js	(revision 679)
+++ /FCKeditor/trunk/editor/_source/classes/fckcontextmenu.js	(revision 680)
@@ -49,4 +49,9 @@
 	{
 		this._Document = mouseClickWindow.document ;
+
+		// Opera doesn't provide a proper contextmenu event
+		if ( FCKBrowserInfo.IsOpera )
+			this.ConfigureOpera()
+
 		this._Document.addEventListener( 'contextmenu', FCKContextMenu_Document_OnContextMenu, false ) ;
 	}
@@ -84,4 +89,8 @@
 function FCKContextMenu_Document_OnContextMenu( e )
 {
+	// If we haven't created the event in Opera ignore it.
+	if ( FCKBrowserInfo.IsOpera && !e.synthetic )
+		return false;
+
 	var el = e.target ;
 
@@ -144,2 +153,69 @@
 	FCKTools.RunFunction( contextMenu.OnItemClick, contextMenu, menuItem ) ;
 }
+
+
+///
+// We will take care to firing our own contextmenu event in Opera
+//
+// TODO: The menu appears way too high.
+//       Respect the preference to keep the default contextmenu on ctrl
+// 		 Provide an alternative to show the contextmenu using left click + accelerator
+// 		 review the code and test it!
+FCKContextMenu.prototype.ConfigureOpera = function()
+{
+	doc = this._Document ;
+	
+	doc.addEventListener( 'mousedown', FCKContextMenu_Opera_mousedown, true ) ;
+
+	doc.addEventListener( 'mouseup', FCKContextMenu_Opera_mouseup, true) ;
+};
+
+function FCKContextMenu_Opera_dispatchCtxMenuEvent( e, evType )
+{
+	var doc = e.target.ownerDocument || (e.view ? e.view.document : null) || e.target ;
+	var newEv = doc.createEvent( 'MouseEvent' ) ;
+	newEv.initMouseEvent( evType||'contextmenu', true, true, doc.defaultView, e.detail,
+		e.screenX, e.screenY, e.clientX, e.clientY, e.ctrlKey, e.altKey,
+		e.shiftKey, e.metaKey, e.button, e.relatedTarget ) ;
+	newEv.synthetic = true ;
+	e.target.dispatchEvent( newEv ) ;
+}
+
+function FCKContextMenu_Opera_mousedown(e)
+{
+	//right-click doesn't fire click event. Only mouseup
+	if ( e && e.button == 2 )
+	{
+		FCKContextMenu_Opera_cancelMenu( e ) ;
+		return false ;
+	}
+}
+
+var overrideButton ;
+	
+function FCKContextMenu_Opera_cancelMenu( e )
+{
+	if( !overrideButton )
+	{
+		var doc = e.target.ownerDocument ;
+		overrideButton = doc.createElement( 'input' ) ;
+		overrideButton.type = 'button' ;
+		(doc.body||doc.documentElement).appendChild( overrideButton ) ;
+	}
+	overrideButton.style = 'position:absolute;top:'+(e.clientY-2)+'px;left:'+(e.clientX-2)+'px;width:5px;height:5px;opacity:0.01' ;
+}
+
+function FCKContextMenu_Opera_mouseup( e )
+{
+	if ( overrideButton )
+	{
+		overrideButton.parentNode.removeChild( overrideButton ) ;
+		overrideButton = undefined ;
+	}
+	if( e && e.button == 2 )
+	{
+		//contextmenu must be fired here if we want to cancel the menu
+		FCKContextMenu_Opera_dispatchCtxMenuEvent( e, 'contextmenu' ) ;
+		return false ;
+	}
+}
