The problem is that because the iframe takes over all events, and Qooxdoo never 
gets the chance to see the right mouse click; I think the only answers are to 
either (a) write a custom widget which puts a transparent blocker on top of the 
iframe so that all events are consumed by Qooxdoo, but this will prevent *all* 
events getting through to the iframe, or (b) you need to inject code into the 
iframe to detect the right click and use postMessage to tell outer window.

John

> On 18 Jan 2015, at 09:07, marchomal <marcho...@gmail.com> wrote:
> 
> Dear all,
> 
> How can i change the context menu for an iframe ?
> 
> This is my example but does not work.
> 
> Thanks in advanced.
> 
> 
> qx.Class.define("qxframemenu.Application",
> {
>       extend : qx.application.Standalone,
>       members :
>       {
>               main : function()
>               {
>                       this.base(arguments);
>                       if (qx.core.Environment.get("qx.debug"))
>                       {
>                               qx.log.appender.Native;
>                               qx.log.appender.Console;
>                       }
>                       
>                       var button1 = new qx.ui.form.Button("First Button",
> "qxframemenu/test.png");
> 
>                       var doc = this.getRoot();
>                       doc.add(button1, {left: 100, top: 50});
>                       button1.addListener("execute", function(e) {
> 
>                               var win = new qx.ui.window.Window("my frame");
>                               win.setWidth(400);
>                               win.setHeight(300);
>                               var layoutDock = new qx.ui.layout.Dock();
>                               win.setLayout( layoutDock );
>                               this.getRoot().add(win, {left:20, top:20});
> 
>                               var iframe = new qx.ui.embed.Iframe("").set({
>                                       frameName: "myframe",
>                                       nativeContextMenu : false
>                               });
>                 
>                               var menu = new qx.ui.menu.Menu();
>                               var b1 = new qx.ui.menu.Button( "b1", null );
>                               var b2 = new qx.ui.menu.Button( "b2", null );
>                               menu.add( b1 );
>                               menu.add( b2 );
>                               iframe.setContextMenu( menu );
>                               
>                               win.add(iframe);
>                               win.center();
>                               win.open();
>                 
> 
>                       }, this);
>               }
>       }
> });
> 
> 
> 
> --
> View this message in context: 
> http://qooxdoo.678.n2.nabble.com/Context-menu-in-iframe-tp7586697.html
> Sent from the qooxdoo mailing list archive at Nabble.com.
> 
> ------------------------------------------------------------------------------
> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
> GigeNET is offering a free month of service with a new server in Ashburn.
> Choose from 2 high performing configs, both with 100TB of bandwidth.
> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
> http://p.sf.net/sfu/gigenet
> _______________________________________________
> qooxdoo-devel mailing list
> qooxdoo-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel



------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to